diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-04-24 13:55:48 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-04-24 13:56:50 +0900 |
commit | e986f20a85f229f1b53dfc96e169bb875f795c41 (patch) | |
tree | 1d7fb99e0605891a8fba07da32f1be79f116191d /shell | |
parent | c727ba1d992acfb175adb273a89729d3df2fd9b0 (diff) |
[fish] Use consistent function names for key bindings (#546)
- fzf-file-widget
- fzf-history-widget
- fzf-cd-widget
Diffstat (limited to 'shell')
-rw-r--r-- | shell/key-bindings.fish | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index e29fdca4..a02937ea 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -13,7 +13,7 @@ function fzf_key_bindings end end - function __fzf_ctrl_t + function fzf-file-widget set -q FZF_CTRL_T_COMMAND; or set -l FZF_CTRL_T_COMMAND " command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \ -o -type f -print \ @@ -25,14 +25,14 @@ function fzf_key_bindings rm -f $TMPDIR/fzf.result end - function __fzf_ctrl_r + function fzf-history-widget history | eval (__fzfcmd) +s +m --tiebreak=index --toggle-sort=ctrl-r $FZF_CTRL_R_OPTS > $TMPDIR/fzf.result and commandline (cat $TMPDIR/fzf.result) commandline -f repaint rm -f $TMPDIR/fzf.result end - function __fzf_alt_c + function fzf-cd-widget set -q FZF_ALT_C_COMMAND; or set -l FZF_ALT_C_COMMAND " command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \ -o -type d -print 2> /dev/null | sed 1d | cut -b3-" @@ -58,14 +58,14 @@ function fzf_key_bindings end end - bind \ct '__fzf_ctrl_t' - bind \cr '__fzf_ctrl_r' - bind \ec '__fzf_alt_c' + bind \ct fzf-file-widget + bind \cr fzf-history-widget + bind \ec fzf-cd-widget if bind -M insert > /dev/null 2>&1 - bind -M insert \ct '__fzf_ctrl_t' - bind -M insert \cr '__fzf_ctrl_r' - bind -M insert \ec '__fzf_alt_c' + bind -M insert \ct fzf-file-widget + bind -M insert \cr fzf-history-widget + bind -M insert \ec fzf-cd-widget end end |