diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2017-08-10 17:16:37 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2017-08-10 17:16:37 +0200 |
commit | e3b67a8198c852bf6c9db3a0a1a20e87a4e1da74 (patch) | |
tree | 8486633f6232f49ea330ab8e036decb5dc3bbf74 /Completion/Unix/Command/_subversion | |
parent | f8edeff2494bf23e2ee29d4c761361b1c878e09d (diff) | |
parent | dc475bfa0ec6cd03789dde3bf28f71e0ea9d5003 (diff) | |
download | zsh-e3b67a8198c852bf6c9db3a0a1a20e87a4e1da74.tar.gz zsh-e3b67a8198c852bf6c9db3a0a1a20e87a4e1da74.zip |
Merge tag '5.4.1' into debian
Release 5.4.1.
Diffstat (limited to 'Completion/Unix/Command/_subversion')
-rw-r--r-- | Completion/Unix/Command/_subversion | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion index b0c032024..b4ccccfae 100644 --- a/Completion/Unix/Command/_subversion +++ b/Completion/Unix/Command/_subversion @@ -36,7 +36,12 @@ _svn () { _svn_cmds=( ${=${(f)${${"$(_comp_locale; _call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:} ) - _store_cache svn-cmds _svn_cmds + if (( $? == 0 )); then + _store_cache svn-cmds _svn_cmds + else + # Ensure we enter this block again on the next <TAB>. + unset _svn_cmds + fi fi fi @@ -135,7 +140,7 @@ _svn () { ) ;; (mergeinfo) - args[(r)--show-revs:arg:]=( '--show-revs=:revisions:(merged eligible)' ) + args[(r)--show-revs=:arg:]=( '--show-revs=:revisions:(merged eligible)' ) ;; (propget|propedit|propdel) args+=( @@ -145,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"' ) @@ -174,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}'[URL for the head version of the file]' \ + '(Author LastChangedBy)'{Author,LastChangedBy}'[last person to modify the file]' \ + '(Date LastChangedDate)'{Date,LastChangedDate}'[date/time the file was last modified]' \ + '(Rev Revision LastChangedRevision)'{Rev,Revision,LastChangedRevision}'[last revision the file changed]' \ + Id'[compressed summary of URL,Revision,Date,Author]' \ + Header"[like '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]" |