summaryrefslogtreecommitdiff
path: root/Completion/Zsh/Command/_fc
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Zsh/Command/_fc')
-rw-r--r--Completion/Zsh/Command/_fc7
1 files changed, 4 insertions, 3 deletions
diff --git a/Completion/Zsh/Command/_fc b/Completion/Zsh/Command/_fc
index 68456cc3d..6cc01f32d 100644
--- a/Completion/Zsh/Command/_fc
+++ b/Completion/Zsh/Command/_fc
@@ -1,7 +1,8 @@
#compdef fc history r
local curcontext="$curcontext" state state_descr line ret=1
-local events num cmd sep
+local num cmd sep
+local -a events
typeset -A opt_args
local fc_common fc_hist fc_r
@@ -68,10 +69,10 @@ esac
if [[ -n $state ]]; then
zstyle -s ":completion:${curcontext}:" list-separator sep || sep=--
- if [[ -z ${line:#*=*} ]] && compset -P '*='; then
+ if [[ -z ${line:#*=*} ]] && compset -P 1 '*='; then
_message -e replacements 'replacement'
elif [[ -prefix [0-9] ]]; then
- events=( ${(0)"$(printf "%-${#HISTNO}.${#HISTNO}s $sep %s\0" "${(kv)history[@]}")"} )
+ print -v events -f "%-${#HISTNO}.${#HISTNO}s $sep %s" "${(kv)history[@]}"
_wanted -2V events expl "$state_descr" compadd -M "B:0=" -ld events - \
"${events[@]%% *}"
elif [[ -prefix - ]]; then