From e986f20a85f229f1b53dfc96e169bb875f795c41 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 24 Apr 2016 13:55:48 +0900 Subject: [fish] Use consistent function names for key bindings (#546) - fzf-file-widget - fzf-history-widget - fzf-cd-widget --- shell/key-bindings.fish | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'shell') 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 -- cgit v1.2.3