Add --dump-format json (#992)
This commit is contained in:
@@ -20,7 +20,7 @@ _just() {
|
||||
|
||||
case "${cmd}" in
|
||||
just)
|
||||
opts=" -q -u -v -e -l -h -V -f -d -c -s --check --dry-run --highlight --no-dotenv --no-highlight --quiet --shell-command --clear-shell-args --unsorted --unstable --verbose --changelog --choose --dump --edit --evaluate --fmt --init --list --summary --variables --help --version --chooser --color --list-heading --list-prefix --justfile --set --shell --shell-arg --working-directory --command --completions --show --dotenv-filename --dotenv-path <ARGUMENTS>... "
|
||||
opts=" -q -u -v -e -l -h -V -f -d -c -s --check --dry-run --highlight --no-dotenv --no-highlight --quiet --shell-command --clear-shell-args --unsorted --unstable --verbose --changelog --choose --dump --edit --evaluate --fmt --init --list --summary --variables --help --version --chooser --color --dump-format --list-heading --list-prefix --justfile --set --shell --shell-arg --working-directory --command --completions --show --dotenv-filename --dotenv-path <ARGUMENTS>... "
|
||||
if [[ ${cur} == -* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
@@ -41,6 +41,10 @@ _just() {
|
||||
COMPREPLY=($(compgen -W "auto always never" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--dump-format)
|
||||
COMPREPLY=($(compgen -W "just json" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--list-heading)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
return 0
|
||||
|
||||
@@ -16,6 +16,7 @@ edit:completion:arg-completer[just] = [@words]{
|
||||
&'just'= {
|
||||
cand --chooser 'Override binary invoked by `--choose`'
|
||||
cand --color 'Print colorful output'
|
||||
cand --dump-format 'Dump justfile as <FORMAT>'
|
||||
cand --list-heading 'Print <TEXT> before list'
|
||||
cand --list-prefix 'Print <TEXT> before each list item'
|
||||
cand -f 'Use <JUSTFILE> as justfile'
|
||||
@@ -48,7 +49,7 @@ edit:completion:arg-completer[just] = [@words]{
|
||||
cand --verbose 'Use verbose output'
|
||||
cand --changelog 'Print changelog'
|
||||
cand --choose 'Select one or more recipes to run using a binary. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`'
|
||||
cand --dump 'Print entire justfile'
|
||||
cand --dump 'Print justfile'
|
||||
cand -e 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`'
|
||||
cand --edit 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`'
|
||||
cand --evaluate 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable''s value.'
|
||||
|
||||
@@ -11,6 +11,7 @@ complete -c just -a '(__fish_just_complete_recipes)'
|
||||
# autogenerated completions
|
||||
complete -c just -n "__fish_use_subcommand" -l chooser -d 'Override binary invoked by `--choose`'
|
||||
complete -c just -n "__fish_use_subcommand" -l color -d 'Print colorful output' -r -f -a "auto always never"
|
||||
complete -c just -n "__fish_use_subcommand" -l dump-format -d 'Dump justfile as <FORMAT>' -r -f -a "just json"
|
||||
complete -c just -n "__fish_use_subcommand" -l list-heading -d 'Print <TEXT> before list'
|
||||
complete -c just -n "__fish_use_subcommand" -l list-prefix -d 'Print <TEXT> before each list item'
|
||||
complete -c just -n "__fish_use_subcommand" -s f -l justfile -d 'Use <JUSTFILE> as justfile'
|
||||
@@ -36,7 +37,7 @@ complete -c just -n "__fish_use_subcommand" -l unstable -d 'Enable unstable feat
|
||||
complete -c just -n "__fish_use_subcommand" -s v -l verbose -d 'Use verbose output'
|
||||
complete -c just -n "__fish_use_subcommand" -l changelog -d 'Print changelog'
|
||||
complete -c just -n "__fish_use_subcommand" -l choose -d 'Select one or more recipes to run using a binary. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`'
|
||||
complete -c just -n "__fish_use_subcommand" -l dump -d 'Print entire justfile'
|
||||
complete -c just -n "__fish_use_subcommand" -l dump -d 'Print justfile'
|
||||
complete -c just -n "__fish_use_subcommand" -s e -l edit -d 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`'
|
||||
complete -c just -n "__fish_use_subcommand" -l evaluate -d 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable\'s value.'
|
||||
complete -c just -n "__fish_use_subcommand" -l fmt -d 'Format and overwrite justfile'
|
||||
|
||||
@@ -21,6 +21,7 @@ Register-ArgumentCompleter -Native -CommandName 'just' -ScriptBlock {
|
||||
'just' {
|
||||
[CompletionResult]::new('--chooser', 'chooser', [CompletionResultType]::ParameterName, 'Override binary invoked by `--choose`')
|
||||
[CompletionResult]::new('--color', 'color', [CompletionResultType]::ParameterName, 'Print colorful output')
|
||||
[CompletionResult]::new('--dump-format', 'dump-format', [CompletionResultType]::ParameterName, 'Dump justfile as <FORMAT>')
|
||||
[CompletionResult]::new('--list-heading', 'list-heading', [CompletionResultType]::ParameterName, 'Print <TEXT> before list')
|
||||
[CompletionResult]::new('--list-prefix', 'list-prefix', [CompletionResultType]::ParameterName, 'Print <TEXT> before each list item')
|
||||
[CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Use <JUSTFILE> as justfile')
|
||||
@@ -53,7 +54,7 @@ Register-ArgumentCompleter -Native -CommandName 'just' -ScriptBlock {
|
||||
[CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Use verbose output')
|
||||
[CompletionResult]::new('--changelog', 'changelog', [CompletionResultType]::ParameterName, 'Print changelog')
|
||||
[CompletionResult]::new('--choose', 'choose', [CompletionResultType]::ParameterName, 'Select one or more recipes to run using a binary. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`')
|
||||
[CompletionResult]::new('--dump', 'dump', [CompletionResultType]::ParameterName, 'Print entire justfile')
|
||||
[CompletionResult]::new('--dump', 'dump', [CompletionResultType]::ParameterName, 'Print justfile')
|
||||
[CompletionResult]::new('-e', 'e', [CompletionResultType]::ParameterName, 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`')
|
||||
[CompletionResult]::new('--edit', 'edit', [CompletionResultType]::ParameterName, 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`')
|
||||
[CompletionResult]::new('--evaluate', 'evaluate', [CompletionResultType]::ParameterName, 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable''s value.')
|
||||
|
||||
@@ -17,6 +17,7 @@ _just() {
|
||||
local common=(
|
||||
'--chooser=[Override binary invoked by `--choose`]' \
|
||||
'--color=[Print colorful output]: :(auto always never)' \
|
||||
'--dump-format=[Dump justfile as <FORMAT>]: :(just json)' \
|
||||
'--list-heading=[Print <TEXT> before list]' \
|
||||
'--list-prefix=[Print <TEXT> before each list item]' \
|
||||
'-f+[Use <JUSTFILE> as justfile]' \
|
||||
@@ -49,7 +50,7 @@ _just() {
|
||||
'*--verbose[Use verbose output]' \
|
||||
'--changelog[Print changelog]' \
|
||||
'--choose[Select one or more recipes to run using a binary. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`]' \
|
||||
'--dump[Print entire justfile]' \
|
||||
'--dump[Print justfile]' \
|
||||
'-e[Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`]' \
|
||||
'--edit[Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`]' \
|
||||
'--evaluate[Evaluate and print all variables. If a variable name is given as an argument, only print that variable'\''s value.]' \
|
||||
|
||||
Reference in New Issue
Block a user