changeset 1486:d7809d6e9db2

zsh: allow 'hg clone' to complete paths listed in ~/.hgrc
author Steve Borho <steve@borho.org>
date Wed, 02 Nov 2005 15:45:41 -0800
parents 625f3f13d7be
children 2bc6cd62a29c
files contrib/zsh_completion
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/zsh_completion	Mon Oct 31 10:47:27 2005 -0800
+++ b/contrib/zsh_completion	Wed Nov 02 15:45:41 2005 -0800
@@ -257,6 +257,7 @@
 
     (clone)
         if (( CURRENT == 2 )); then
+            repos=( $(hg paths | sed -e 's/^.*= //') )
             _arguments \
             '(--no-update)-U[do not update the new working directory]' \
             '(-U)--no-update[do not update the new working directory]' \
@@ -265,6 +266,7 @@
             '--pull[use pull protocol to copy metadata]' \
             '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
             '*:local repo:_files -/'
+            _wanted source expl 'source repository' compadd -a repos
         elif (( CURRENT == 3 )); then
             _arguments '*:dest repo:_files -/'
         fi