diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2016-12-04 04:32:03 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2016-12-04 04:32:03 +0100 |
commit | 3e439c3863f14c82f70666804c8570a13b3732e6 (patch) | |
tree | 07036c43e0f3f9242bb6dd42cd2a849ec8ea8aca /Completion/Zsh/Command/_fc | |
parent | 2aedc4b88fd0e87b89583983951b04b96f48efd3 (diff) | |
parent | 7b7e84f0815ed22a0ee348a217776529035dccf3 (diff) | |
download | zsh-3e439c3863f14c82f70666804c8570a13b3732e6.tar.gz zsh-3e439c3863f14c82f70666804c8570a13b3732e6.zip |
Merge tag 'zsh-5.2-test-1' into debian
Diffstat (limited to 'Completion/Zsh/Command/_fc')
-rw-r--r-- | Completion/Zsh/Command/_fc | 7 |
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 |