1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00

change suffix style to still do expansion if the suffix contains something to expand (12115)

This commit is contained in:
Sven Wischnowsky 2000-06-29 07:10:31 +00:00
parent 4e2e7f292f
commit d15f36ab5b
3 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,9 @@
2000-06-29 Sven Wischnowsky <wischnow@zsh.org> 2000-06-29 Sven Wischnowsky <wischnow@zsh.org>
* 12115: Completion/Core/_expand, Doc/Zsh/compsys.yo: change
suffix style to still do expansion if the suffix contains
something to expand
* 12114: Completion/Core/_main_complete, Doc/Zsh/compsys.yo: even * 12114: Completion/Core/_main_complete, Doc/Zsh/compsys.yo: even
more fun with the menu style (no=num, yes=long-list, reverse more fun with the menu style (no=num, yes=long-list, reverse
meaning of yes=num) meaning of yes=num)

View file

@ -36,7 +36,7 @@ fi
[[ "$word" = *\$\{[^\}]# ]] && return 1 [[ "$word" = *\$\{[^\}]# ]] && return 1
zstyle -T ":completion:${curcontext}:" suffix && zstyle -T ":completion:${curcontext}:" suffix &&
[[ "$word" = (\~*/*|\$[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]*|\$\{*\}?*) ]] && [[ "$word" = (\~*/|\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|\$\{*\}?)[^\$\{\}\(\)\<\>?^*#~]# ]] &&
return 1 return 1
zstyle -t ":completion:${curcontext}:" accept-exact || zstyle -t ":completion:${curcontext}:" accept-exact ||

View file

@ -1888,7 +1888,8 @@ This is used by the tt(_expand) completer if the word starts with a
tilde or parameter expansion. If it is set to `true', the word will tilde or parameter expansion. If it is set to `true', the word will
only be expanded if it doesn't have a suffix, i.e. if it is something only be expanded if it doesn't have a suffix, i.e. if it is something
like `tt(~foo)' or `tt($foo)', but not if it is `tt(~foo/)' or like `tt(~foo)' or `tt($foo)', but not if it is `tt(~foo/)' or
`tt($foo/bar)'. The default for this style is `true'. `tt($foo/bar)', unless that suffix itself contains characters eligible
for expansion. The default for this style is `true'.
) )
kindex(tag-order, completion style) kindex(tag-order, completion style)
item(tt(tag-order))( item(tt(tag-order))(