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

_darcs() {
    # 1 based array
    if (($CURRENT == 2)); then
        compadd -- $( darcs --commands | grep "^$PREFIX" )
        return 0
    fi

    compadd -- $( darcs ${words[2]} --list-option |  grep "^$PREFIX" )
    return 0
}

_darcs "$@"