zsh: support remote cloning
authorBrendan Cully <brendan@kublai.com>
Tue, 31 Oct 2006 15:48:02 -0800
changeset 3601 cedf056bb723
parent 3600 932dadd2e614
child 3602 ec221317e018
zsh: support remote cloning
contrib/zsh_completion
--- a/contrib/zsh_completion	Tue Oct 31 15:44:16 2006 -0800
+++ b/contrib/zsh_completion	Tue Oct 31 15:48:02 2006 -0800
@@ -239,6 +239,11 @@
     'urls:URL:_hg_urls'
 }
 
+_hg_clone_dest() {
+  _alternative 'directories:directory:_files -/' \
+    'urls:URL:_hg_urls'
+}
+
 # Common options
 _hg_global_opts=(
     '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/'
@@ -337,7 +342,7 @@
   '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \
   '--uncompressed[use uncompressed transfer (fast over LAN)]' \
   ':source repository:_hg_remote' \
-  ':destination:_files -/'  
+  ':destination:_hg_clone_dest'
 }
 
 _hg_cmd_commit() {