1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

Some syntax adjustments in _expand_word_and_keep. Add a working URL.

This commit is contained in:
Barton E. Schaefer 2013-10-27 14:12:54 -07:00
parent c39d2f8e49
commit 4748eff7d2
2 changed files with 20 additions and 10 deletions

View file

@ -1,5 +1,8 @@
2013-10-27 Barton E. Schaefer <schaefer@zsh.org>
* unposted (cf. users/18063): Functions/Zle/keeper: clean up
some syntax nits, add working link to old Unix Review article
* 31912: Src/exec.c: in closemn(), distinguish closing for >&-
from closing for a real redirect. Fixes knock-on multios bug
introduced by workers/20666 way back in 2005.

View file

@ -4,6 +4,9 @@
# Shell Corner column on UnixReview.com in January 2005 at the URL
# <http://www.unixreview.com/documents/s=9513/ur0501a/ur0501a.htm>
#
# Article still available on the Wayback Machine:
# <http://web.archive.org/web/20050207041146/http://www.unixreview.com/documents/s=9513/ur0501a/ur0501a.htm>
#
# A few minor edits have been made to those functions for this file. Key
# bindings are commented out to avoid clashes with any existing bindings.
##
@ -69,17 +72,21 @@ zstyle ':completion:expand-kept-result:*' completer _insert_kept
# "_insert_kept".
_expand_word_and_keep() {
function compadd() {
local -A args
zparseopts -E -A args J:
if [[ $args[-J] == all-expansions ]]
then
builtin compadd -A kept "$@"
kept=( ${(Q)${(z)kept}} )
fi
builtin compadd "$@"
{
function compadd {
local -A args
zparseopts -E -A args J:
if [[ $args[-J] == all-expansions ]]
then
builtin compadd -A kept "$@"
kept=( ${(Q)${(z)kept}} )
fi
builtin compadd "$@"
}
_expand_word
} always {
unfunction compadd
}
{ _expand_word } always { unfunction compadd }
}
zle -C _expand_word complete-word _expand_word_and_keep