summaryrefslogtreecommitdiffstats
path: root/shell/key-bindings.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'shell/key-bindings.zsh')
-rw-r--r--shell/key-bindings.zsh6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index 07f02bfd..b6f0b376 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -107,12 +107,12 @@ fi
# CTRL-R - Paste the selected command from history into the command line
fzf-history-widget() {
local selected num
- setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null
+ setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases noglob 2> /dev/null
# Ensure the associative history array, which maps event numbers to the full
# history lines, is loaded, and that Perl is installed for multi-line output.
if zmodload -F zsh/parameter p:history 2>/dev/null && (( ${#commands[perl]} )); then
- selected="$(printf '%1$s\t%2$s\000' "${(vk)history[@]}" |
- perl -0 -ne 'if (!$seen{(/^\s*[0-9]+\**\s+(.*)/, $1)}++) { s/\n/\n\t/gm; print; }' |
+ selected="$(printf '%s\t%s\000' "${(@kv)history}" |
+ perl -0 -ne 'if (!$seen{(/^\s*[0-9]+\**\t(.*)/s, $1)}++) { s/\n/\n\t/g; print; }' |
FZF_DEFAULT_OPTS=$(__fzf_defaults "" "-n2..,.. --scheme=history --bind=ctrl-r:toggle-sort --highlight-line ${FZF_CTRL_R_OPTS-} --query=${(qqq)LBUFFER} +m --read0") \
FZF_DEFAULT_OPTS_FILE='' $(__fzfcmd))"
else