diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/bash_completion/git-bug | 81 | ||||
-rw-r--r-- | misc/zsh_completion/git-bug | 15 |
2 files changed, 64 insertions, 32 deletions
diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug index 94c2db96..9fb336b4 100644 --- a/misc/bash_completion/git-bug +++ b/misc/bash_completion/git-bug @@ -248,6 +248,35 @@ _git_bug() { __start_git-bug "$@" } +_git-bug_add() +{ + last_command="git-bug_add" + + command_aliases=() + + commands=() + + flags=() + two_word_flags=() + local_nonpersistent_flags=() + flags_with_completion=() + flags_completion=() + + flags+=("--title=") + two_word_flags+=("-t") + local_nonpersistent_flags+=("--title=") + flags+=("--message=") + two_word_flags+=("-m") + local_nonpersistent_flags+=("--message=") + flags+=("--file=") + two_word_flags+=("-F") + local_nonpersistent_flags+=("--file=") + + must_have_one_flag=() + must_have_one_noun=() + noun_aliases=() +} + _git-bug_close() { last_command="git-bug_close" @@ -291,6 +320,26 @@ _git-bug_commands() noun_aliases=() } +_git-bug_comment_add() +{ + last_command="git-bug_comment_add" + + command_aliases=() + + commands=() + + flags=() + two_word_flags=() + local_nonpersistent_flags=() + flags_with_completion=() + flags_completion=() + + + must_have_one_flag=() + must_have_one_noun=() + noun_aliases=() +} + _git-bug_comment() { last_command="git-bug_comment" @@ -298,6 +347,7 @@ _git-bug_comment() command_aliases=() commands=() + commands+=("add") flags=() two_word_flags=() @@ -378,35 +428,6 @@ _git-bug_ls() noun_aliases=() } -_git-bug_new() -{ - last_command="git-bug_new" - - command_aliases=() - - commands=() - - flags=() - two_word_flags=() - local_nonpersistent_flags=() - flags_with_completion=() - flags_completion=() - - flags+=("--title=") - two_word_flags+=("-t") - local_nonpersistent_flags+=("--title=") - flags+=("--message=") - two_word_flags+=("-m") - local_nonpersistent_flags+=("--message=") - flags+=("--file=") - two_word_flags+=("-F") - local_nonpersistent_flags+=("--file=") - - must_have_one_flag=() - must_have_one_noun=() - noun_aliases=() -} - _git-bug_open() { last_command="git-bug_open" @@ -537,12 +558,12 @@ _git-bug_root_command() command_aliases=() commands=() + commands+=("add") commands+=("close") commands+=("commands") commands+=("comment") commands+=("label") commands+=("ls") - commands+=("new") commands+=("open") commands+=("pull") commands+=("push") diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug index dcd83163..4f1b4dd2 100644 --- a/misc/zsh_completion/git-bug +++ b/misc/zsh_completion/git-bug @@ -2,12 +2,23 @@ _arguments \ '1: :->level1' \ - '2: :_files' + '2: :->level2' \ + '3: :_files' case $state in level1) case $words[1] in git-bug) - _arguments '1: :(close commands comment label ls new open pull push show termui webui)' + _arguments '1: :(add close commands comment label ls open pull push show termui webui)' + ;; + *) + _arguments '*: :_files' + ;; + esac + ;; + level2) + case $words[2] in + comment) + _arguments '2: :(add)' ;; *) _arguments '*: :_files' |