contrib/zsh_completion
changeset 1486 d7809d6e9db2
parent 1484 840808c57969
child 1544 b3184bea3eb3
equal deleted inserted replaced
1485:625f3f13d7be 1486:d7809d6e9db2
   255         '*:name, then revision:($tags)'
   255         '*:name, then revision:($tags)'
   256     ;;
   256     ;;
   257 
   257 
   258     (clone)
   258     (clone)
   259         if (( CURRENT == 2 )); then
   259         if (( CURRENT == 2 )); then
       
   260             repos=( $(hg paths | sed -e 's/^.*= //') )
   260             _arguments \
   261             _arguments \
   261             '(--no-update)-U[do not update the new working directory]' \
   262             '(--no-update)-U[do not update the new working directory]' \
   262             '(-U)--no-update[do not update the new working directory]' \
   263             '(-U)--no-update[do not update the new working directory]' \
   263             '(--ssh)-e[specify ssh command to use]:string:' \
   264             '(--ssh)-e[specify ssh command to use]:string:' \
   264             '(-e)--ssh[specify ssh command to use]:string:' \
   265             '(-e)--ssh[specify ssh command to use]:string:' \
   265             '--pull[use pull protocol to copy metadata]' \
   266             '--pull[use pull protocol to copy metadata]' \
   266             '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
   267             '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
   267             '*:local repo:_files -/'
   268             '*:local repo:_files -/'
       
   269             _wanted source expl 'source repository' compadd -a repos
   268         elif (( CURRENT == 3 )); then
   270         elif (( CURRENT == 3 )); then
   269             _arguments '*:dest repo:_files -/'
   271             _arguments '*:dest repo:_files -/'
   270         fi
   272         fi
   271     ;;
   273     ;;
   272 
   274