aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/gen_bash_completion.go2
-rw-r--r--misc/gen_powershell_completion.go24
-rw-r--r--misc/gen_zsh_completion.go2
-rw-r--r--misc/powershell_completion/git-bug207
-rw-r--r--misc/zsh_completion/git-bug442
5 files changed, 629 insertions, 48 deletions
diff --git a/misc/gen_bash_completion.go b/misc/gen_bash_completion.go
index f2506606..2d5e400b 100644
--- a/misc/gen_bash_completion.go
+++ b/misc/gen_bash_completion.go
@@ -15,7 +15,7 @@ func main() {
cwd, _ := os.Getwd()
dir := path.Join(cwd, "misc", "bash_completion", "git-bug")
- fmt.Println("Generating bash completion file ...")
+ fmt.Println("Generating Bash completion file ...")
err := commands.RootCmd.GenBashCompletionFile(dir)
if err != nil {
diff --git a/misc/gen_powershell_completion.go b/misc/gen_powershell_completion.go
new file mode 100644
index 00000000..c2766399
--- /dev/null
+++ b/misc/gen_powershell_completion.go
@@ -0,0 +1,24 @@
+// +build ignore
+
+package main
+
+import (
+ "fmt"
+ "log"
+ "os"
+ "path"
+
+ "github.com/MichaelMure/git-bug/commands"
+)
+
+func main() {
+ cwd, _ := os.Getwd()
+ filepath := path.Join(cwd, "misc", "powershell_completion", "git-bug")
+
+ fmt.Println("Generating PowerShell completion file ...")
+
+ err := commands.RootCmd.GenPowerShellCompletionFile(filepath)
+ if err != nil {
+ log.Fatal(err)
+ }
+}
diff --git a/misc/gen_zsh_completion.go b/misc/gen_zsh_completion.go
index 184cab43..f80477d7 100644
--- a/misc/gen_zsh_completion.go
+++ b/misc/gen_zsh_completion.go
@@ -15,7 +15,7 @@ func main() {
cwd, _ := os.Getwd()
filepath := path.Join(cwd, "misc", "zsh_completion", "git-bug")
- fmt.Println("Generating zsh completion file ...")
+ fmt.Println("Generating ZSH completion file ...")
err := commands.RootCmd.GenZshCompletionFile(filepath)
if err != nil {
diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug
new file mode 100644
index 00000000..7eff1cda
--- /dev/null
+++ b/misc/powershell_completion/git-bug
@@ -0,0 +1,207 @@
+using namespace System.Management.Automation
+using namespace System.Management.Automation.Language
+Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock {
+ param($wordToComplete, $commandAst, $cursorPosition)
+ $commandElements = $commandAst.CommandElements
+ $command = @(
+ 'git-bug'
+ for ($i = 1; $i -lt $commandElements.Count; $i++) {
+ $element = $commandElements[$i]
+ if ($element -isnot [StringConstantExpressionAst] -or
+ $element.StringConstantType -ne [StringConstantType]::BareWord -or
+ $element.Value.StartsWith('-')) {
+ break
+ }
+ $element.Value
+ }
+ ) -join ';'
+ $completions = @(switch ($command) {
+ 'git-bug' {
+ [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Create a new bug.')
+ [CompletionResult]::new('bridge', 'bridge', [CompletionResultType]::ParameterValue, 'Configure and use bridges to other bug trackers.')
+ [CompletionResult]::new('commands', 'commands', [CompletionResultType]::ParameterValue, 'Display available commands.')
+ [CompletionResult]::new('comment', 'comment', [CompletionResultType]::ParameterValue, 'Display or add comments to a bug.')
+ [CompletionResult]::new('deselect', 'deselect', [CompletionResultType]::ParameterValue, 'Clear the implicitly selected bug.')
+ [CompletionResult]::new('label', 'label', [CompletionResultType]::ParameterValue, 'Display, add or remove labels to/from a bug.')
+ [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List bugs.')
+ [CompletionResult]::new('ls-id', 'ls-id', [CompletionResultType]::ParameterValue, 'List bug identifiers.')
+ [CompletionResult]::new('ls-label', 'ls-label', [CompletionResultType]::ParameterValue, 'List valid labels.')
+ [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Pull bugs update from a git remote.')
+ [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Push bugs update to a git remote.')
+ [CompletionResult]::new('select', 'select', [CompletionResultType]::ParameterValue, 'Select a bug for implicit use in future commands.')
+ [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Display the details of a bug.')
+ [CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Display or change a bug status.')
+ [CompletionResult]::new('termui', 'termui', [CompletionResultType]::ParameterValue, 'Launch the terminal UI.')
+ [CompletionResult]::new('title', 'title', [CompletionResultType]::ParameterValue, 'Display or change a title of a bug.')
+ [CompletionResult]::new('user', 'user', [CompletionResultType]::ParameterValue, 'Display or change the user identity.')
+ [CompletionResult]::new('version', 'version', [CompletionResultType]::ParameterValue, 'Show git-bug version information.')
+ [CompletionResult]::new('webui', 'webui', [CompletionResultType]::ParameterValue, 'Launch the web UI.')
+ break
+ }
+ 'git-bug;add' {
+ [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Provide a title to describe the issue')
+ [CompletionResult]::new('--title', 'title', [CompletionResultType]::ParameterName, 'Provide a title to describe the issue')
+ [CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'Provide a message to describe the issue')
+ [CompletionResult]::new('--message', 'message', [CompletionResultType]::ParameterName, 'Provide a message to describe the issue')
+ [CompletionResult]::new('-F', 'F', [CompletionResultType]::ParameterName, 'Take the message from the given file. Use - to read the message from the standard input')
+ [CompletionResult]::new('--file', 'file', [CompletionResultType]::ParameterName, 'Take the message from the given file. Use - to read the message from the standard input')
+ break
+ }
+ 'git-bug;bridge' {
+ [CompletionResult]::new('configure', 'configure', [CompletionResultType]::ParameterValue, 'Configure a new bridge.')
+ [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Pull updates.')
+ [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Delete a configured bridge.')
+ break
+ }
+ 'git-bug;bridge;configure' {
+ [CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'A distinctive name to identify the bridge')
+ [CompletionResult]::new('--name', 'name', [CompletionResultType]::ParameterName, 'A distinctive name to identify the bridge')
+ [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,launchpad-preview]')
+ [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,launchpad-preview]')
+ [CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'The URL of the target repository')
+ [CompletionResult]::new('--url', 'url', [CompletionResultType]::ParameterName, 'The URL of the target repository')
+ [CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'The owner of the target repository')
+ [CompletionResult]::new('--owner', 'owner', [CompletionResultType]::ParameterName, 'The owner of the target repository')
+ [CompletionResult]::new('-T', 'T', [CompletionResultType]::ParameterName, 'The authentication token for the API')
+ [CompletionResult]::new('--token', 'token', [CompletionResultType]::ParameterName, 'The authentication token for the API')
+ [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'The name of the target repository')
+ [CompletionResult]::new('--project', 'project', [CompletionResultType]::ParameterName, 'The name of the target repository')
+ break
+ }
+ 'git-bug;bridge;pull' {
+ break
+ }
+ 'git-bug;bridge;rm' {
+ break
+ }
+ 'git-bug;commands' {
+ [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Output the command description as well as Markdown compatible comment')
+ [CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'Output the command description as well as Markdown compatible comment')
+ break
+ }
+ 'git-bug;comment' {
+ [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add a new comment to a bug.')
+ break
+ }
+ 'git-bug;comment;add' {
+ [CompletionResult]::new('-F', 'F', [CompletionResultType]::ParameterName, 'Take the message from the given file. Use - to read the message from the standard input')
+ [CompletionResult]::new('--file', 'file', [CompletionResultType]::ParameterName, 'Take the message from the given file. Use - to read the message from the standard input')
+ [CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'Provide the new message from the command line')
+ [CompletionResult]::new('--message', 'message', [CompletionResultType]::ParameterName, 'Provide the new message from the command line')
+ break
+ }
+ 'git-bug;deselect' {
+ break
+ }
+ 'git-bug;label' {
+ [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add a label to a bug.')
+ [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove a label from a bug.')
+ break
+ }
+ 'git-bug;label;add' {
+ break
+ }
+ 'git-bug;label;rm' {
+ break
+ }
+ 'git-bug;ls' {
+ [CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Filter by status. Valid values are [open,closed]')
+ [CompletionResult]::new('--status', 'status', [CompletionResultType]::ParameterName, 'Filter by status. Valid values are [open,closed]')
+ [CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'Filter by author')
+ [CompletionResult]::new('--author', 'author', [CompletionResultType]::ParameterName, 'Filter by author')
+ [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Filter by participant')
+ [CompletionResult]::new('--participant', 'participant', [CompletionResultType]::ParameterName, 'Filter by participant')
+ [CompletionResult]::new('-A', 'A', [CompletionResultType]::ParameterName, 'Filter by actor')
+ [CompletionResult]::new('--actor', 'actor', [CompletionResultType]::ParameterName, 'Filter by actor')
+ [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'Filter by label')
+ [CompletionResult]::new('--label', 'label', [CompletionResultType]::ParameterName, 'Filter by label')
+ [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Filter by title')
+ [CompletionResult]::new('--title', 'title', [CompletionResultType]::ParameterName, 'Filter by title')
+ [CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Filter by absence of something. Valid values are [label]')
+ [CompletionResult]::new('--no', 'no', [CompletionResultType]::ParameterName, 'Filter by absence of something. Valid values are [label]')
+ [CompletionResult]::new('-b', 'b', [CompletionResultType]::ParameterName, 'Sort the results by a characteristic. Valid values are [id,creation,edit]')
+ [CompletionResult]::new('--by', 'by', [CompletionResultType]::ParameterName, 'Sort the results by a characteristic. Valid values are [id,creation,edit]')
+ [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Select the sorting direction. Valid values are [asc,desc]')
+ [CompletionResult]::new('--direction', 'direction', [CompletionResultType]::ParameterName, 'Select the sorting direction. Valid values are [asc,desc]')
+ break
+ }
+ 'git-bug;ls-id' {
+ break
+ }
+ 'git-bug;ls-label' {
+ break
+ }
+ 'git-bug;pull' {
+ break
+ }
+ 'git-bug;push' {
+ break
+ }
+ 'git-bug;select' {
+ break
+ }
+ 'git-bug;show' {
+ [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Select field to display. Valid values are [author,authorEmail,createTime,humanId,id,labels,shortId,status,title,actors,participants]')
+ [CompletionResult]::new('--field', 'field', [CompletionResultType]::ParameterName, 'Select field to display. Valid values are [author,authorEmail,createTime,humanId,id,labels,shortId,status,title,actors,participants]')
+ break
+ }
+ 'git-bug;status' {
+ [CompletionResult]::new('close', 'close', [CompletionResultType]::ParameterValue, 'Mark a bug as closed.')
+ [CompletionResult]::new('open', 'open', [CompletionResultType]::ParameterValue, 'Mark a bug as open.')
+ break
+ }
+ 'git-bug;status;close' {
+ break
+ }
+ 'git-bug;status;open' {
+ break
+ }
+ 'git-bug;termui' {
+ break
+ }
+ 'git-bug;title' {
+ [CompletionResult]::new('edit', 'edit', [CompletionResultType]::ParameterValue, 'Edit a title of a bug.')
+ break
+ }
+ 'git-bug;title;edit' {
+ [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'Provide a title to describe the issue')
+ [CompletionResult]::new('--title', 'title', [CompletionResultType]::ParameterName, 'Provide a title to describe the issue')
+ break
+ }
+ 'git-bug;user' {
+ [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Select field to display. Valid values are [email,humanId,id,lastModification,lastModificationLamport,login,metadata,name]')
+ [CompletionResult]::new('--field', 'field', [CompletionResultType]::ParameterName, 'Select field to display. Valid values are [email,humanId,id,lastModification,lastModificationLamport,login,metadata,name]')
+ [CompletionResult]::new('adopt', 'adopt', [CompletionResultType]::ParameterValue, 'Adopt an existing identity as your own.')
+ [CompletionResult]::new('create', 'create', [CompletionResultType]::ParameterValue, 'Create a new identity.')
+ [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List identities.')
+ break
+ }
+ 'git-bug;user;adopt' {
+ break
+ }
+ 'git-bug;user;create' {
+ break
+ }
+ 'git-bug;user;ls' {
+ break
+ }
+ 'git-bug;version' {
+ [CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Only show the version number')
+ [CompletionResult]::new('--number', 'number', [CompletionResultType]::ParameterName, 'Only show the version number')
+ [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Only show the commit hash')
+ [CompletionResult]::new('--commit', 'commit', [CompletionResultType]::ParameterName, 'Only show the commit hash')
+ [CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'Show all version informations')
+ [CompletionResult]::new('--all', 'all', [CompletionResultType]::ParameterName, 'Show all version informations')
+ break
+ }
+ 'git-bug;webui' {
+ [CompletionResult]::new('--open', 'open', [CompletionResultType]::ParameterName, 'Automatically open the web UI in the default browser')
+ [CompletionResult]::new('--no-open', 'no-open', [CompletionResultType]::ParameterName, 'Prevent the automatic opening of the web UI in the default browser')
+ [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Port to listen to (default is random)')
+ [CompletionResult]::new('--port', 'port', [CompletionResultType]::ParameterName, 'Port to listen to (default is random)')
+ break
+ }
+ })
+ $completions.Where{ $_.CompletionText -like "$wordToComplete*" } |
+ Sort-Object -Property ListItemText
+} \ No newline at end of file
diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug
index c2ed9872..ed676724 100644
--- a/misc/zsh_completion/git-bug
+++ b/misc/zsh_completion/git-bug
@@ -1,46 +1,396 @@
-#compdef git-bug
-
-_arguments \
- '1: :->level1' \
- '2: :->level2' \
- '3: :_files'
-case $state in
- level1)
- case $words[1] in
- git-bug)
- _arguments '1: :(add bridge commands comment deselect label ls ls-id ls-label pull push select show status termui title user version webui)'
- ;;
- *)
- _arguments '*: :_files'
- ;;
- esac
- ;;
- level2)
- case $words[2] in
- bridge)
- _arguments '2: :(configure pull rm)'
- ;;
- comment)
- _arguments '2: :(add)'
- ;;
- label)
- _arguments '2: :(add rm)'
- ;;
- status)
- _arguments '2: :(close open)'
- ;;
- title)
- _arguments '2: :(edit)'
- ;;
- user)
- _arguments '2: :(adopt create ls)'
- ;;
- *)
- _arguments '*: :_files'
- ;;
- esac
- ;;
- *)
- _arguments '*: :_files'
- ;;
-esac
+#compdef _git-bug git-bug
+
+
+function _git-bug {
+ local -a commands
+
+ _arguments -C \
+ "1: :->cmnds" \
+ "*::arg:->args"
+
+ case $state in
+ cmnds)
+ commands=(
+ "add:Create a new bug."
+ "bridge:Configure and use bridges to other bug trackers."
+ "commands:Display available commands."
+ "comment:Display or add comments to a bug."
+ "deselect:Clear the implicitly selected bug."
+ "label:Display, add or remove labels to/from a bug."
+ "ls:List bugs."
+ "ls-id:List bug identifiers."
+ "ls-label:List valid labels."
+ "pull:Pull bugs update from a git remote."
+ "push:Push bugs update to a git remote."
+ "select:Select a bug for implicit use in future commands."
+ "show:Display the details of a bug."
+ "status:Display or change a bug status."
+ "termui:Launch the terminal UI."
+ "title:Display or change a title of a bug."
+ "user:Display or change the user identity."
+ "version:Show git-bug version information."
+ "webui:Launch the web UI."
+ )
+ _describe "command" commands
+ ;;
+ esac
+
+ case "$words[1]" in
+ add)
+ _git-bug_add
+ ;;
+ bridge)
+ _git-bug_bridge
+ ;;
+ commands)
+ _git-bug_commands
+ ;;
+ comment)
+ _git-bug_comment
+ ;;
+ deselect)
+ _git-bug_deselect
+ ;;
+ label)
+ _git-bug_label
+ ;;
+ ls)
+ _git-bug_ls
+ ;;
+ ls-id)
+ _git-bug_ls-id
+ ;;
+ ls-label)
+ _git-bug_ls-label
+ ;;
+ pull)
+ _git-bug_pull
+ ;;
+ push)
+ _git-bug_push
+ ;;
+ select)
+ _git-bug_select
+ ;;
+ show)
+ _git-bug_show
+ ;;
+ status)
+ _git-bug_status
+ ;;
+ termui)
+ _git-bug_termui
+ ;;
+ title)
+ _git-bug_title
+ ;;
+ user)
+ _git-bug_user
+ ;;
+ version)
+ _git-bug_version
+ ;;
+ webui)
+ _git-bug_webui
+ ;;
+ esac
+}
+
+function _git-bug_add {
+ _arguments \
+ '(-t --title)'{-t,--title}'[Provide a title to describe the issue]:' \
+ '(-m --message)'{-m,--message}'[Provide a message to describe the issue]:' \
+ '(-F --file)'{-F,--file}'[Take the message from the given file. Use - to read the message from the standard input]:'
+}
+
+
+function _git-bug_bridge {
+ local -a commands
+
+ _arguments -C \
+ "1: :->cmnds" \
+ "*::arg:->args"
+
+ case $state in
+ cmnds)
+ commands=(
+ "configure:Configure a new bridge."
+ "pull:Pull updates."
+ "rm:Delete a configured bridge."
+ )
+ _describe "command" commands
+ ;;
+ esac
+
+ case "$words[1]" in
+ configure)
+ _git-bug_bridge_configure
+ ;;
+ pull)
+ _git-bug_bridge_pull
+ ;;
+ rm)
+ _git-bug_bridge_rm
+ ;;
+ esac
+}
+
+function _git-bug_bridge_configure {
+ _arguments \
+ '(-n --name)'{-n,--name}'[A distinctive name to identify the bridge]:' \
+ '(-t --target)'{-t,--target}'[The target of the bridge. Valid values are [github,launchpad-preview]]:' \
+ '(-u --url)'{-u,--url}'[The URL of the target repository]:' \
+ '(-o --owner)'{-o,--owner}'[The owner of the target repository]:' \
+ '(-T --token)'{-T,--token}'[The authentication token for the API]:' \
+ '(-p --project)'{-p,--project}'[The name of the target repository]:'
+}
+
+function _git-bug_bridge_pull {
+ _arguments
+}
+
+function _git-bug_bridge_rm {
+ _arguments
+}
+
+function _git-bug_commands {
+ _arguments \
+ '(-p --pretty)'{-p,--pretty}'[Output the command description as well as Markdown compatible comment]'
+}
+
+
+function _git-bug_comment {
+ local -a commands
+
+ _arguments -C \
+ "1: :->cmnds" \
+ "*::arg:->args"
+
+ case $state in
+ cmnds)
+ commands=(
+ "add:Add a new comment to a bug."
+ )
+ _describe "command" commands
+ ;;
+ esac
+
+ case "$words[1]" in
+ add)
+ _git-bug_comment_add
+ ;;
+ esac
+}
+
+function _git-bug_comment_add {
+ _arguments \
+ '(-F --file)'{-F,--file}'[Take the message from the given file. Use - to read the message from the standard input]:' \
+ '(-m --message)'{-m,--message}'[Provide the new message from the command line]:'
+}
+
+function _git-bug_deselect {
+ _arguments
+}
+
+
+function _git-bug_label {
+ local -a commands
+
+ _arguments -C \
+ "1: :->cmnds" \
+ "*::arg:->args"
+
+ case $state in
+ cmnds)
+ commands=(
+ "add:Add a label to a bug."
+ "rm:Remove a label from a bug."
+ )
+ _describe "command" commands
+ ;;
+ esac
+
+ case "$words[1]" in
+ add)
+ _git-bug_label_add
+ ;;
+ rm)
+ _git-bug_label_rm
+ ;;
+ esac
+}
+
+function _git-bug_label_add {
+ _arguments
+}
+
+function _git-bug_label_rm {
+ _arguments
+}
+
+function _git-bug_ls {
+ _arguments \
+ '(*-s *--status)'{\*-s,\*--status}'[Filter by status. Valid values are [open,closed]]:' \
+ '(*-a *--author)'{\*-a,\*--author}'[Filter by author]:' \
+ '(*-p *--participant)'{\*-p,\*--participant}'[Filter by participant]:' \
+ '(*-A *--actor)'{\*-A,\*--actor}'[Filter by actor]:' \
+ '(*-l *--label)'{\*-l,\*--label}'[Filter by label]:' \
+ '(*-t *--title)'{\*-t,\*--title}'[Filter by title]:' \
+ '(*-n *--no)'{\*-n,\*--no}'[Filter by absence of something. Valid values are [label]]:' \
+ '(-b --by)'{-b,--by}'[Sort the results by a characteristic. Valid values are [id,creation,edit]]:' \
+ '(-d --direction)'{-d,--direction}'[Select the sorting direction. Valid values are [asc,desc]]:'
+}
+
+function _git-bug_ls-id {
+ _arguments
+}
+
+function _git-bug_ls-label {
+ _arguments
+}
+
+function _git-bug_pull {
+ _arguments
+}
+
+function _git-bug_push {
+ _arguments
+}
+
+function _git-bug_select {
+ _arguments
+}
+
+function _git-bug_show {
+ _arguments \
+ '(-f --field)'{-f,--field}'[Select field to display. Valid values are [author,authorEmail,createTime,humanId,id,labels,shortId,status,title,actors,participants]]:'
+}
+
+
+function _git-bug_status {
+ local -a commands
+
+ _arguments -C \
+ "1: :->cmnds" \
+ "*::arg:->args"
+
+ case $state in
+ cmnds)
+ commands=(
+ "close:Mark a bug as closed."
+ "open:Mark a bug as open."
+ )
+ _describe "command" commands
+ ;;
+ esac
+
+ case "$words[1]" in
+ close)
+ _git-bug_status_close
+ ;;
+ open)
+ _git-bug_status_open
+ ;;
+ esac
+}
+
+function _git-bug_status_close {
+ _arguments
+}
+
+function _git-bug_status_open {
+ _arguments
+}
+
+function _git-bug_termui {
+ _arguments
+}
+
+
+function _git-bug_title {
+ local -a commands
+
+ _arguments -C \
+ "1: :->cmnds" \
+ "*::arg:->args"
+
+ case $state in
+ cmnds)
+ commands=(
+ "edit:Edit a title of a bug."
+ )
+ _describe "command" commands
+ ;;
+ esac
+
+ case "$words[1]" in
+ edit)
+ _git-bug_title_edit
+ ;;
+ esac
+}
+
+function _git-bug_title_edit {
+ _arguments \
+ '(-t --title)'{-t,--title}'[Provide a title to describe the issue]:'
+}
+
+
+function _git-bug_user {
+ local -a commands
+
+ _arguments -C \
+ '(-f --field)'{-f,--field}'[Select field to display. Valid values are [email,humanId,id,lastModification,lastModificationLamport,login,metadata,name]]:' \
+ "1: :->cmnds" \
+ "*::arg:->args"
+
+ case $state in
+ cmnds)
+ commands=(
+ "adopt:Adopt an existing identity as your own."
+ "create:Create a new identity."
+ "ls:List identities."
+ )
+ _describe "command" commands
+ ;;
+ esac
+
+ case "$words[1]" in
+ adopt)
+ _git-bug_user_adopt
+ ;;
+ create)
+ _git-bug_user_create
+ ;;
+ ls)
+ _git-bug_user_ls
+ ;;
+ esac
+}
+
+function _git-bug_user_adopt {
+ _arguments
+}
+
+function _git-bug_user_create {
+ _arguments
+}
+
+function _git-bug_user_ls {
+ _arguments
+}
+
+function _git-bug_version {
+ _arguments \
+ '(-n --number)'{-n,--number}'[Only show the version number]' \
+ '(-c --commit)'{-c,--commit}'[Only show the commit hash]' \
+ '(-a --all)'{-a,--all}'[Show all version informations]'
+}
+
+function _git-bug_webui {
+ _arguments \
+ '--open[Automatically open the web UI in the default browser]' \
+ '--no-open[Prevent the automatic opening of the web UI in the default browser]' \
+ '(-p --port)'{-p,--port}'[Port to listen to (default is random)]:'
+}
+