Allow setting echoed recipe line color (#1670)
This commit is contained in:
@@ -20,7 +20,7 @@ _just() {
|
||||
|
||||
case "${cmd}" in
|
||||
just)
|
||||
opts=" -n -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>... "
|
||||
opts=" -n -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 --command-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
|
||||
@@ -48,6 +48,10 @@ _just() {
|
||||
COMPREPLY=($(compgen -W "auto always never" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--command-color)
|
||||
COMPREPLY=($(compgen -W "black blue cyan green purple red yellow" -- "${cur}"))
|
||||
return 0
|
||||
;;
|
||||
--dump-format)
|
||||
COMPREPLY=($(compgen -W "just json" -- "${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 --command-color 'Echo recipe lines in <COMMAND-COLOR>'
|
||||
cand --dump-format 'Dump justfile as <FORMAT>'
|
||||
cand --list-heading 'Print <TEXT> before list'
|
||||
cand --list-prefix 'Print <TEXT> before each list item'
|
||||
|
||||
@@ -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 command-color -d 'Echo recipe lines in <COMMAND-COLOR>' -r -f -a "black blue cyan green purple red yellow"
|
||||
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'
|
||||
|
||||
@@ -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('--command-color', 'command-color', [CompletionResultType]::ParameterName, 'Echo recipe lines in <COMMAND-COLOR>')
|
||||
[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')
|
||||
|
||||
@@ -17,6 +17,7 @@ _just() {
|
||||
local common=(
|
||||
'--chooser=[Override binary invoked by `--choose`]' \
|
||||
'--color=[Print colorful output]: :(auto always never)' \
|
||||
'--command-color=[Echo recipe lines in <COMMAND-COLOR>]: :(black blue cyan green purple red yellow)' \
|
||||
'--dump-format=[Dump justfile as <FORMAT>]: :(just json)' \
|
||||
'--list-heading=[Print <TEXT> before list]' \
|
||||
'--list-prefix=[Print <TEXT> before each list item]' \
|
||||
|
||||
Reference in New Issue
Block a user