From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11400 invoked by alias); 21 May 2012 16:19:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30481 Received: (qmail 5571 invoked from network); 21 May 2012 16:19:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120521091901.ZM32541@torch.brasslantern.com> Date: Mon, 21 May 2012 09:19:01 -0700 In-reply-to: <8CECA1C5-C06C-4888-B5C9-21C8DF5EC2C6@gmail.com> Comments: In reply to Hong Xu "Suggestion: chmod +x auto completion only completes files that do not have executable permission" (May 18, 4:56pm) References: <8CECA1C5-C06C-4888-B5C9-21C8DF5EC2C6@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Hong Xu , "zsh-workers@zsh.org " Subject: Re: Suggestion: chmod +x auto completion only completes files that do not have executable permission MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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?