diff options
author | Oliver Kiddle <opk@zsh.org> | 2021-11-19 21:54:50 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2021-11-19 21:54:50 +0100 |
commit | 973e356c34378d3d81585f83efe1349fc6c58d06 (patch) | |
tree | 918bd59ebbc03fcfe46f5a172fd9746795158a6a /Completion/Unix/Command | |
parent | 8cf76fb8f923917af3c21036c5132256d6b421e1 (diff) | |
download | zsh-973e356c34378d3d81585f83efe1349fc6c58d06.tar.gz zsh-973e356c34378d3d81585f83efe1349fc6c58d06.tar.xz zsh-973e356c34378d3d81585f83efe1349fc6c58d06.zip |
49594: adapt to changes in 49499 to ensure file modes starting with dash aren't taken to be flags
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_chmod | 5 |
1 files changed, 4 insertions, 1 deletions
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' ) |