From d7851356062d23250ad0fbee660a249c37460b40 Mon Sep 17 00:00:00 2001 From: Yuji Nakao Date: Wed, 2 Sep 2020 17:27:56 +0900 Subject: [PATCH] [zsh] Fix the regular expression (#2140) Fix the regular expression to capture the command containing asterisk. --- shell/key-bindings.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index 74ce9b71..559690a7 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -100,7 +100,7 @@ bindkey '\ec' fzf-cd-widget fzf-history-widget() { local selected num setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null - selected=( $(fc -rl 1 | perl -ne 'print if !$seen{(/^\s*[0-9]+\s+(.*)/, $1)}++' | + selected=( $(fc -rl 1 | perl -ne 'print if !$seen{(/^\s*[0-9]+\**\s+(.*)/, $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=$? if [ -n "$selected" ]; then