From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH] _svn: Complete propvals in 'propset'.
Date: Thu, 27 Jul 2017 13:38:54 +0000 [thread overview]
Message-ID: <20170727133854.2325-1-danielsh@tarpaulin.shahaf.local2> (raw)
---
Completion/Unix/Command/_subversion | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index 2f6b567ac..b4e6c2e6e 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -150,7 +150,8 @@ _svn () {
;;
(propset)
args=(
- ':propname:(svn:ignore svn:keywords svn:executable svn:eol-style svn:mime-type svn:externals svn:needs-lock)'
+ ':propname:(svn:ignore svn:keywords svn:executable svn:eol-style svn:mime-type svn:externals svn:needs-lock svn:global-ignores svn:auto-props)'
+ ':propval:->propset_propval'
${args/(#b)(*--file*):arg:/$match[1]:file:_files}
'*:path or url: _alternative "files:file:_files" "urls:URL:_svn_urls"'
)
@@ -179,6 +180,28 @@ _svn () {
esac
_arguments "$args[@]" && ret=0
+ case $state in
+ (propset_propval)
+ case $words[2] in
+ (svn:executable|svn:needs-lock) compadd yes;;
+ (svn:keywords)
+ compset -q
+ # '_values -w' only excludes words in argv[1] or later, so
+ # install a dummy argv[0]. This affects Foo in [[svn propset
+ # svn:keywords 'Foo Bar Baz <TAB>]].
+ words=( dummy $words ); (( ++CURRENT ))
+ _values -s ' ' -w "keywords (or custom)" \
+ '(URL HeadURL)'{URL,HeadURL}'[The URL for the head version of the file]' \
+ '(Author LastChangedBy)'{Author,LastChangedBy}'[The last person to modify the file]' \
+ '(Date LastChangedDate)'{Date,LastChangedDate}'[The date/time the file was last modified]' \
+ '(Rev Revision LastChangedRevision)'{Rev,Revision,LastChangedRevision}'[The last revision the file changed]' \
+ Id'[A compressed summary of URL,Revision,Date,Author]' \
+ Header'[Similar to Id but includes the full URL]';;
+ (svn:eol-style) compadd - CR LF CRLF native;;
+ (svn:mime-type) _mime_types;;
+ (*) _message 'property value';;
+ esac
+ esac
else
_message "unknown svn command: $words[1]"
reply other threads:[~2017-07-27 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170727133854.2325-1-danielsh@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--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).