From ff650ada052fccaf4b5a7bbc3b689fa20c2378ea Mon Sep 17 00:00:00 2001 From: Jun T Date: Sun, 5 Jan 2014 21:52:56 +0900 Subject: 32231: _chmod was confused by options before the mode --- Completion/Unix/Command/_chmod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Completion/Unix/Command/_chmod') diff --git a/Completion/Unix/Command/_chmod b/Completion/Unix/Command/_chmod index 6cb310d57..5d3cb2c78 100644 --- a/Completion/Unix/Command/_chmod +++ b/Completion/Unix/Command/_chmod @@ -57,12 +57,12 @@ case "$state" in zmodload -F zsh/stat b:zstat 2>/dev/null typeset -i8 ref=$(zstat +mode $opt_args[--reference]) _wanted files expl file _files -g "*(-.^f${ref#??})" && ret=0 - elif [[ $words[2] = [0-7]## ]]; then - _wanted files expl file _files -g "*(-.^f$words[2])" && ret=0 + elif [[ $line[1] = [0-7]## ]]; then + _wanted files expl file _files -g "*(-.^f$line[1])" && ret=0 else local spec who op priv local -a specs - for spec in ${(s:,:)words[2]}; do + for spec in ${(s:,:)line[1]}; do if [[ ${spec#*[+-=]} != [rwxst]## ]]; then _files && ret=0 return ret -- cgit 1.4.1