summary refs log tree commit diff
path: root/Completion/Unix/Command/_darcs
blob: 7aa57643b54813b0f44e47d1b2e1d13c3867f29f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#compdef darcs

if (($CURRENT == 2)); then
  # We're completing the first word after "darcs" -- the command.
  _wanted command expl 'darcs command' \
    compadd -- $( darcs --commands )
else
  # Find the options/files/URL/etc. for the current command by using darcs.
  _wanted args expl 'arg for darcs command' \
    compadd -- $( darcs ${words[2]} --list-option )
fi