aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorvince <vincetiu8@gmail.com>2020-06-14 08:41:50 +0800
committerMichael Muré <batolettre@gmail.com>2020-06-16 15:05:48 +0200
commitde5565b5f9830556afa7bb5a95fa4e3f27a755c5 (patch)
tree3051a8ebe1a874cc36c69eb314eebd46e2c80d70 /misc
parent6352d6aa2338f47cd8b60631dec5f4161d9d92ec (diff)
downloadgit-bug-de5565b5f9830556afa7bb5a95fa4e3f27a755c5.tar.gz
ls: Add support to ls dump bug information in specific formats
This adds an optional flag to the ls command that allows users to specify the format they wish to dump the output as. Currently, supported parameters are 'default', 'plain' and 'json'.
Diffstat (limited to 'misc')
-rw-r--r--misc/bash_completion/git-bug4
-rw-r--r--misc/powershell_completion/git-bug2
-rw-r--r--misc/zsh_completion/git-bug3
3 files changed, 8 insertions, 1 deletions
diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug
index b86edb9f..93c75b8e 100644
--- a/misc/bash_completion/git-bug
+++ b/misc/bash_completion/git-bug
@@ -807,6 +807,10 @@ _git-bug_ls()
two_word_flags+=("--direction")
two_word_flags+=("-d")
local_nonpersistent_flags+=("--direction=")
+ flags+=("--format=")
+ two_word_flags+=("--format")
+ two_word_flags+=("-f")
+ local_nonpersistent_flags+=("--format=")
must_have_one_flag=()
must_have_one_noun=()
diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug
index 59d2bf12..3c08fda3 100644
--- a/misc/powershell_completion/git-bug
+++ b/misc/powershell_completion/git-bug
@@ -159,6 +159,8 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock {
[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]')
+ [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Select the output formatting style. Valid values are [default, plain(text), json]')
+ [CompletionResult]::new('--format', 'format', [CompletionResultType]::ParameterName, 'Select the output formatting style. Valid values are [default, plain(text), json]')
break
}
'git-bug;ls-id' {
diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug
index d28bd244..69e55b4a 100644
--- a/misc/zsh_completion/git-bug
+++ b/misc/zsh_completion/git-bug
@@ -303,7 +303,8 @@ function _git-bug_ls {
'(*-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]]:'
+ '(-d --direction)'{-d,--direction}'[Select the sorting direction. Valid values are [asc,desc]]:' \
+ '(-f --format)'{-f,--format}'[Select the output formatting style. Valid values are [default, plain(text), json]]:'
}
function _git-bug_ls-id {