mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
47737: _zstyle: Fix option completion when positional arguments are already present (regression from workers/39659 (commit ae3b675ce6
))
The following case: LBUFFER='zstyle -' RBUFFER=' foo bar' Before this patch, completed 'context pattern' (from the first positional argument). With this patch, completes options, which is correct.
This commit is contained in:
parent
aebdbfd7ba
commit
2ffd292833
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2021-03-29 dana <dana@dana.is>
|
||||
|
||||
* 47737: Completion/Zsh/Command/_zstyle: Fix option completion
|
||||
when positional arguments are already present (regression from
|
||||
workers/39659 (commit ae3b675ce6e4ac62451ea08169c2b4dc45cf533b))
|
||||
|
||||
2021-03-29 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* unposted: ChangeLog: Fix X-Seq numbers for the 39657, 39658,
|
||||
|
|
|
@ -218,7 +218,7 @@ taglist=(
|
|||
)
|
||||
|
||||
# Be careful with the context arguments here. They like to masquerade.
|
||||
_arguments -C \
|
||||
_arguments -C -A '-*' \
|
||||
'(: -)-L[output in form of zstyle commands]:pattern for context patterns:->metapatterns:style:->metastyles' \
|
||||
'(: -)-d[delete style definitions]:verbatim context pattern:->patterns:*:styles:->pstyles' \
|
||||
'(: -)-e[value is evaluated when style is looked up]:context pattern:->contexts:style:->styles:*:command:_cmdstring' \
|
||||
|
@ -229,7 +229,7 @@ _arguments -C \
|
|||
'(: -)-t[test a style, returning false if it'\''s undefined]:context name:->contexts:style:->styles:*:strings to test presence of: ' \
|
||||
'(: -)-T[test a style, returning true if it'\''s undefined]:context name:->contexts:style:->styles:*:strings to test presence of: ' \
|
||||
'(: -)-m[pattern-match values of a style]:context name:->contexts:style:->styles:pattern: ' \
|
||||
'(-):context pattern:->contexts' '(-):style:->styles' '(-)*:argument:->style-arg'
|
||||
':context pattern:->contexts' ':style:->styles' '*:argument:->style-arg'
|
||||
|
||||
while (( $#state )); do
|
||||
case "$state[1]" in
|
||||
|
|
Loading…
Reference in a new issue