aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-06-26 01:02:27 +0200
committerGitHub <noreply@github.com>2020-06-26 01:02:27 +0200
commit2dd0dbb1344ae9293aae05346f977b5d5907934b (patch)
tree610ff7e381ef99827dc1b1dbc9ae4ea137fe5e21 /misc
parentf790083fb28ac0e68acddc9d5e7a709107a70bab (diff)
parentc326007d01b623bcf883f74f31fc3e5ab3078396 (diff)
downloadgit-bug-2dd0dbb1344ae9293aae05346f977b5d5907934b.tar.gz
Merge pull request #410 from MichaelMure/output-formatting-2
Add formatting options to the 'show' and 'user ls' commands
Diffstat (limited to 'misc')
-rw-r--r--misc/bash_completion/git-bug9
-rw-r--r--misc/powershell_completion/git-bug13
-rw-r--r--misc/zsh_completion/git-bug8
3 files changed, 21 insertions, 9 deletions
diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug
index 93c75b8e..c3e62849 100644
--- a/misc/bash_completion/git-bug
+++ b/misc/bash_completion/git-bug
@@ -933,8 +933,11 @@ _git-bug_show()
flags+=("--field=")
two_word_flags+=("--field")
- two_word_flags+=("-f")
local_nonpersistent_flags+=("--field=")
+ flags+=("--format=")
+ two_word_flags+=("--format")
+ two_word_flags+=("-f")
+ local_nonpersistent_flags+=("--format=")
must_have_one_flag=()
must_have_one_noun=()
@@ -1122,6 +1125,10 @@ _git-bug_user_ls()
flags_with_completion=()
flags_completion=()
+ 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 9f51c785..0a8c7b5a 100644
--- a/misc/powershell_completion/git-bug
+++ b/misc/powershell_completion/git-bug
@@ -159,8 +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]')
+ [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Select the output formatting style. Valid values are [default,plain,json,org-mode]')
+ [CompletionResult]::new('--format', 'format', [CompletionResultType]::ParameterName, 'Select the output formatting style. Valid values are [default,plain,json,org-mode]')
break
}
'git-bug;ls-id' {
@@ -179,8 +179,9 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock {
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]')
+ [CompletionResult]::new('--field', 'field', [CompletionResultType]::ParameterName, 'Select field to display. Valid values are [author,authorEmail,createTime,lastEdit,humanId,id,labels,shortId,status,title,actors,participants]')
+ [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Select the output formatting style. Valid values are [default,json,org-mode]')
+ [CompletionResult]::new('--format', 'format', [CompletionResultType]::ParameterName, 'Select the output formatting style. Valid values are [default,json,org-mode]')
break
}
'git-bug;status' {
@@ -221,6 +222,8 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock {
break
}
'git-bug;user;ls' {
+ [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Select the output formatting style. Valid values are [default,json]')
+ [CompletionResult]::new('--format', 'format', [CompletionResultType]::ParameterName, 'Select the output formatting style. Valid values are [default,json]')
break
}
'git-bug;version' {
@@ -242,4 +245,4 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock {
})
$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 18a49668..ba15f3bc 100644
--- a/misc/zsh_completion/git-bug
+++ b/misc/zsh_completion/git-bug
@@ -304,7 +304,7 @@ function _git-bug_ls {
'(*-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]]:' \
- '(-f --format)'{-f,--format}'[Select the output formatting style. Valid values are [default, plain(text), json]]:'
+ '(-f --format)'{-f,--format}'[Select the output formatting style. Valid values are [default,plain,json,org-mode]]:'
}
function _git-bug_ls-id {
@@ -329,7 +329,8 @@ function _git-bug_select {
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]]:'
+ '--field[Select field to display. Valid values are [author,authorEmail,createTime,lastEdit,humanId,id,labels,shortId,status,title,actors,participants]]:' \
+ '(-f --format)'{-f,--format}'[Select the output formatting style. Valid values are [default,json,org-mode]]:'
}
@@ -443,7 +444,8 @@ function _git-bug_user_create {
}
function _git-bug_user_ls {
- _arguments
+ _arguments \
+ '(-f --format)'{-f,--format}'[Select the output formatting style. Valid values are [default,json]]:'
}
function _git-bug_version {