On May 18,  4:56pm, Hong Xu wrote:
}
} I have a suggestion about chmod auto completion here. We could
} complete only chmod +x with files that do not have executable
} permission, and vice versa. We could also apply this rule to chmod +r,
} chmod +w, etc. What do you think?
As far as I can tell, chmod completion already does this.  _chmod has
this snippet:
     for spec in ${(s:,:)words[2]}
     do
	if [[ ${spec#*[+-=]} != [rwxst]## ]]
	then
	    _files&&  ret=0
	    return ret
	fi
	specs+=(${${(M)spec##[+-=]*}:+a}$spec)
     done
     _wanted files expl file _files -g "*(-.^f:${(j.,.)specs}:)"&&  ret=0
Do you have a case where it's failing?