# HG changeset patch # User Steve Borho # Date 2005-11-02 23:45:41 # Node ID d7809d6e9db2ea7bd6f955b7c04e1a0bf70b57de # Parent 625f3f13d7be071ae7b59a03fa533870318d039b zsh: allow 'hg clone' to complete paths listed in ~/.hgrc diff --git a/contrib/zsh_completion b/contrib/zsh_completion --- a/contrib/zsh_completion +++ b/contrib/zsh_completion @@ -257,6 +257,7 @@ case $service in (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 @@ case $service in '--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