fish: add '...' key binding
This commit is contained in:
parent
109c5787f1
commit
4146c9200e
12
fish/functions/expand_dots.fish
Normal file
12
fish/functions/expand_dots.fish
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# https://github.com/nickeb96/puffer-fish
|
||||||
|
function expand_dots -d 'Expand ... to ../..'
|
||||||
|
set -l item (string split ' ' (commandline --cut-at-cursor))[-1]
|
||||||
|
switch $item
|
||||||
|
case './*'
|
||||||
|
commandline --insert '.'
|
||||||
|
case '*..'
|
||||||
|
commandline --insert '/..'
|
||||||
|
case '*'
|
||||||
|
commandline --insert '.'
|
||||||
|
end
|
||||||
|
end
|
@ -10,4 +10,7 @@ function fish_user_key_bindings
|
|||||||
bind \cp __fzf_files
|
bind \cp __fzf_files
|
||||||
bind \cg __fzf_git_log
|
bind \cg __fzf_git_log
|
||||||
bind \cr __fzf_history
|
bind \cr __fzf_history
|
||||||
|
|
||||||
|
# Expand '...' to '../..'
|
||||||
|
bind . expand_dots
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user