From: Bart Schaefer <schaefer@brasslantern.com>
To: Hong Xu <xuhdev@gmail.com>, "zsh-workers@zsh.org " <zsh-workers@zsh.org>
Subject: Re: Suggestion: chmod +x auto completion only completes files that do not have executable permission
Date: Mon, 21 May 2012 09:19:01 -0700 [thread overview]
Message-ID: <120521091901.ZM32541@torch.brasslantern.com> (raw)
In-Reply-To: <8CECA1C5-C06C-4888-B5C9-21C8DF5EC2C6@gmail.com>
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?
next prev parent reply other threads:[~2012-05-21 16:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 8:56 Hong Xu
2012-05-21 16:19 ` Bart Schaefer [this message]
2012-05-22 8:31 ` Hong Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=120521091901.ZM32541@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=xuhdev@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).