From 59ea2e018e05e7a4033d572f819f4a696ab74397 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 20 Feb 2019 21:56:33 +0100 Subject: add a "version" command with various outputs, including the git hash and tag --- misc/bash_completion/git-bug | 30 ++++++++++++++++++++++++++++++ misc/zsh_completion/git-bug | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) (limited to 'misc') diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug index d6c28214..4c22c1e0 100644 --- a/misc/bash_completion/git-bug +++ b/misc/bash_completion/git-bug @@ -779,6 +779,35 @@ _git-bug_title() noun_aliases=() } +_git-bug_version() +{ + last_command="git-bug_version" + + command_aliases=() + + commands=() + + flags=() + two_word_flags=() + local_nonpersistent_flags=() + flags_with_completion=() + flags_completion=() + + flags+=("--number") + flags+=("-n") + local_nonpersistent_flags+=("--number") + flags+=("--commit") + flags+=("-c") + local_nonpersistent_flags+=("--commit") + flags+=("--all") + flags+=("-a") + local_nonpersistent_flags+=("--all") + + must_have_one_flag=() + must_have_one_noun=() + noun_aliases=() +} + _git-bug_webui() { last_command="git-bug_webui" @@ -824,6 +853,7 @@ _git-bug_root_command() commands+=("status") commands+=("termui") commands+=("title") + commands+=("version") commands+=("webui") flags=() diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug index 2deae548..a416ccef 100644 --- a/misc/zsh_completion/git-bug +++ b/misc/zsh_completion/git-bug @@ -8,7 +8,7 @@ case $state in level1) case $words[1] in git-bug) - _arguments '1: :(add bridge commands comment deselect label ls ls-label pull push select show status termui title webui)' + _arguments '1: :(add bridge commands comment deselect label ls ls-label pull push select show status termui title version webui)' ;; *) _arguments '*: :_files' -- cgit