diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-12-09 17:42:28 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-12-09 17:42:28 +0000 |
commit | 19913bc78444b6359f66bcec4d41af61f318f291 (patch) | |
tree | e4b9f42c186783ff3b3916f5de3d0eade21d7079 /Functions/Zle | |
parent | 6f5b07da730ada1de1104a3c830c90ea7e6a6541 (diff) | |
download | zsh-19913bc78444b6359f66bcec4d41af61f318f291.tar.gz zsh-19913bc78444b6359f66bcec4d41af61f318f291.tar.xz zsh-19913bc78444b6359f66bcec4d41af61f318f291.zip |
20614: fix 20613
Diffstat (limited to 'Functions/Zle')
-rw-r--r-- | Functions/Zle/match-words-by-style | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Functions/Zle/match-words-by-style b/Functions/Zle/match-words-by-style index 277fe058f..def43f2e9 100644 --- a/Functions/Zle/match-words-by-style +++ b/Functions/Zle/match-words-by-style @@ -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:]]#' |