about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-04-19 20:37:00 +0000
committerClint Adams <clint@users.sourceforge.net>2007-04-19 20:37:00 +0000
commitad2d19e2e631ad10dbed53578445ac9929237a89 (patch)
tree5e5ce1aed48fccd8c568ce2cf7b6e09feb120108
parent8f0fefdbfdd61d1400852c34a94b3827cf88285a (diff)
downloadzsh-ad2d19e2e631ad10dbed53578445ac9929237a89.tar.gz
zsh-ad2d19e2e631ad10dbed53578445ac9929237a89.tar.xz
zsh-ad2d19e2e631ad10dbed53578445ac9929237a89.zip
23302: complete properties after svn propget and propedit.
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_subversion14
2 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 96436c5a9..2968e369f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
 	* 23301: Paul Ackersviller: Functions/Misc/add-zsh-hook:
 	fix semicolon mistyped as a colon.
 
+	* 23302: Completion/Unix/Command/_subversion: complete properties
+	after svn propget and propedit.
+
 2007-04-19  Peter Stephenson  <pws@csr.com>
 
 	* unposted: Config/version.mk: set release string to 4.3.4-dev-0.
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index 84e63a343..88a8f1d66 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -72,6 +72,12 @@ _svn () {
 	      '*:file:_files -g "*(e:_svn_controlled:)"'
             )
           ;;
+	  (propget|propedit)
+	    args+=(
+		'1:property name:_svn_props'
+		'2:target: _alternative "files:file:_files" "urls:URL:_svn_urls"'
+	    )
+	  ;;
 	  (propset)
 	    args=(
 	    ':propname:(svn:ignore svn:keywords svn:executable svn:eol-style svn:mime-type svn:externals svn:needs-lock)'
@@ -234,6 +240,14 @@ _svnadmin_commands() {
   compadd "$@" -k _svnadmin_cmds || compadd "$@" ${(s.:.)_svnadmin_cmds}
 }
 
+(( $+functions[_svn_props] )) ||
+_svn_props() {
+  local properties
+
+  properties=( ${${(M)${(f)"$(svn proplist 2>/dev/null)"}:#  [^ ]*}#  } )
+  compadd "$@" -a properties && return 0
+}
+
 _subversion () {
   case $service in
     (svn) _svn "$@" ;;