diff options
Diffstat (limited to '_jira')
-rw-r--r-- | _jira | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/_jira b/_jira new file mode 100644 index 000000000000..c5dc6a2eda51 --- /dev/null +++ b/_jira @@ -0,0 +1,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 |