mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 17:24:50 +01:00
34961: unquote history words when command line has a quote
This commit is contained in:
parent
87e76f89bb
commit
54fe61ab32
2 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2015-04-25 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 34961: Completion/Base/Completer/_history: unquote history words
|
||||
when command line has a quote
|
||||
|
||||
* 34961: Completion/compaudit: properly handle the case of finding
|
||||
no files when searching $fpath and $_compdir
|
||||
|
||||
|
|
|
@ -51,9 +51,14 @@ ISUFFIX=
|
|||
# We skip the first element of historywords so the current word doesn't
|
||||
# interfere with the completion
|
||||
|
||||
local -a hslice
|
||||
while [[ $compstate[nmatches] -eq 0 && beg -lt max ]]; do
|
||||
if [[ -n $compstate[quote] ]]
|
||||
then hslice=( ${(Q)historywords[beg,beg+slice]} )
|
||||
else hslice=( ${historywords[beg,beg+slice]} )
|
||||
fi
|
||||
_wanted "$opt" history-words expl 'history word' \
|
||||
compadd -Q -a 'historywords[beg,beg+slice]'
|
||||
compadd -Q -a hslice
|
||||
(( beg+=slice ))
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue