1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-30 19:20:53 +02:00

19839, 19842: improve handling of #q in qualifiers

This commit is contained in:
Peter Stephenson 2004-04-27 17:00:11 +00:00
parent aa7003e0ca
commit 28bd1b02cf
2 changed files with 11 additions and 2 deletions

View file

@ -1,5 +1,10 @@
2004-04-27 Peter Stephenson <pws@csr.com>
* 19839 (plus suggestion from 19842):
Completion/Unix/Type/_path_files: handle existing (#q)'s
in qualifiers when adding sort options and adding back
qualifiers from command line.
* 19840: Src/Zle/zle_main.c: also, vared now only takes
one normal argument.

View file

@ -120,7 +120,9 @@ if zstyle -s ":completion:${curcontext}:" file-sort tmp1; then
tmp2=()
for tmp1 in "$pats[@]"; do
if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
if [[ "$tmp1" = (#b)(*[^\$])"(#q"(*)")" ]]; then
tmp2=( "$tmp2[@]" "${match[1]}(#q${sort}${match[2]})" )
elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
tmp2=( "$tmp2[@]" "${match[1]}((${sort}${match[2][3,-1]}" )
elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then
tmp2=( "$tmp2[@]" "${match[1]}(${sort}${match[2][2,-1]}" )
@ -168,7 +170,9 @@ if [[ -n "$compstate[pattern_match]" &&
fi
tmp2=()
for tmp1 in "$pats[@]"; do
if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
if [[ "$tmp1" = (#b)(*[^\$])"(#q"(*)")" ]]; then
tmp2=( "$tmp2[@]" "${match[1]}(#q${tmp3}${match[2]})" )
elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
tmp2=( "$tmp2[@]" "${match[1]}((${tmp3}${match[2][3,-1]}" )
elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then
tmp2=( "$tmp2[@]" "${match[1]}(${tmp3}${match[2][2,-1]}" )