summarylogtreecommitdiffstats
path: root/_jira
blob: c5dc6a2eda51173147b35f9ccb1352eaef968c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#compdef jira

_jira() {
   local matches=($(${words[1]} --completion-bash "${(@)words[1,$CURRENT]}"))
    compadd -a matches
    if [[ $compstate[nmatches] -eq 0 && $words[$CURRENT] != -* ]]; then
        _files
    fi
}

# don't run the completion function when being source-ed or eval-ed
if [ "$funcstack[1]" = "_jira" ]; then
	_jira
fi