diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2019-10-17 14:51:57 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2019-10-17 14:51:57 +0900 |
commit | 0c6c76e08115d0ba160e2c95c8692e4174aa5368 (patch) | |
tree | fc096edef7869bdc8228f4a031dc7d73fb117b4a /shell/key-bindings.zsh | |
parent | f1520bdde6c268cf3c77a70574b35019de3bcdd0 (diff) |
[zsh] Suppress global alias expansion in widget functions
Close #1708
Diffstat (limited to 'shell/key-bindings.zsh')
-rw-r--r-- | shell/key-bindings.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index 6aacc7e1..a77d1362 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -8,7 +8,7 @@ __fsel() { -o -type f -print \ -o -type d -print \ -o -type l -print 2> /dev/null | cut -b3-"}" - setopt localoptions pipefail 2> /dev/null + setopt localoptions pipefail no_aliases 2> /dev/null eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS" $(__fzfcmd) -m "$@" | while read item; do echo -n "${(q)item} " done @@ -49,7 +49,7 @@ zle -N fzf-redraw-prompt fzf-cd-widget() { local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ -o -type d -print 2> /dev/null | cut -b3-"}" - setopt localoptions pipefail 2> /dev/null + setopt localoptions pipefail no_aliases 2> /dev/null local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)" if [[ -z "$dir" ]]; then zle redisplay @@ -66,7 +66,7 @@ bindkey '\ec' fzf-cd-widget # CTRL-R - Paste the selected command from history into the command line fzf-history-widget() { local selected num - setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null + setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null selected=( $(fc -rl 1 | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) ) local ret=$? |