diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Unix/Command/_chmod | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 9c6d1b5a2..d678081a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2021-11-19 Oliver Kiddle <opk@zsh.org> + * 49594: Completion/Unix/Command/_chmod: adapt to changes in 49499 + to ensure file modes starting with dash aren't taken to be flags + * 49584: Completion/Unix/Command/_gem: allow for build options in gem install completion diff --git a/Completion/Unix/Command/_chmod b/Completion/Unix/Command/_chmod index 3f6db7e91..42e3fa63b 100644 --- a/Completion/Unix/Command/_chmod +++ b/Completion/Unix/Command/_chmod @@ -1,7 +1,10 @@ #compdef chmod gchmod zf_chmod local curcontext="$curcontext" state line expl ret=1 variant -local -a args privs aopts=( -A '-*' ) +local -a args privs aopts + +# usual -* pattern picks up valid non-options, e.g. -x which is like a-x +aopts=( -A '-[^gorstuwxX]*' ) args=( '*: :->files' '1: :_file_modes' ) |