1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2026-01-04 09:01:06 +01:00

20614: fix 20613

This commit is contained in:
Peter Stephenson 2004-12-09 17:42:28 +00:00
parent 6f5b07da73
commit 19913bc784
2 changed files with 8 additions and 8 deletions

View file

@ -1,7 +1,8 @@
2004-12-09 Peter Stephenson <pws@csr.com>
* 20613: Functions/Zle/match-words-by-style: fix inconsistencies
with embedded whitespace when matching by shell words.
* 20613, 20614: Functions/Zle/match-words-by-style: fix
inconsistencies with embedded whitespace when matching by shell
words.
* 20612: Doc/Zsh/contrib.yo, Functions/Zle/match-words-by-style:
options to match-words-by-style can override styles.

View file

@ -75,7 +75,7 @@ if [[ -z $curcontext ]]; then
local curcontext=:zle:match-words-by-style
fi
while getopts "w:s:c:C:tT" opt; do
while getopts "w:s:c:C:" opt; do
case $opt in
(w)
wordstyle=$OPTARG
@ -140,12 +140,11 @@ case $wordstyle in
# Find out what's in front.
eval pat1='${LBUFFER%%(#b)('${wordpat1}')('${spacepat}')}'
# Now everything from ${#pat1}+1 is wordy
wordpat1=${(q)LBUFFER[${#pat1}+1,-1]}
wordpat1=${LBUFFER[${#pat1}+1,-1]}
wordpat2=${RBUFFER[1,${#bufwords[$nwords]}-${#wordpat1}+1]}
# Likewise at the end...
eval pat2='${RBUFFER##(#b)('${charskip}${spacepat}')('\
${wordpat2}')('${spacepat}')}'
wordpat2=${(q)RBUFFER[1,-1-${#pat2}]}
wordpat1=${(q)wordpat1}
wordpat2=${(q)wordpat2}
fi
;;
(*space) spacepat='[[:space:]]#'