From b1eed71dff86a54c2a0c4fa6cc4a3f75625cb77f Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sun, 14 Jan 2024 02:41:33 -0800 Subject: [PATCH] Completions --- completions/just.bash | 2 +- completions/just.elvish | 2 ++ completions/just.fish | 1 + completions/just.powershell | 2 ++ completions/just.zsh | 2 ++ 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/completions/just.bash b/completions/just.bash index 15adcf9b5a..c5a7122c27 100644 --- a/completions/just.bash +++ b/completions/just.bash @@ -20,7 +20,7 @@ _just() { case "${cmd}" in just) - opts=" -n -q -u -v -e -l -h -V -f -d -c -s --check --yes --dry-run --highlight --no-deps --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 ... " + opts=" -n -q -u -v -e -l -g -h -V -f -d -c -s --check --yes --dry-run --highlight --no-deps --no-dotenv --no-highlight --quiet --shell-command --clear-shell-args --unsorted --unstable --verbose --changelog --choose --dump --edit --evaluate --fmt --init --list --summary --variables --global --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 ... " if [[ ${cur} == -* ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/completions/just.elvish b/completions/just.elvish index 49b19a2531..76c91f0ed8 100644 --- a/completions/just.elvish +++ b/completions/just.elvish @@ -63,6 +63,8 @@ edit:completion:arg-completer[just] = [@words]{ cand --list 'List available recipes and their arguments' cand --summary 'List names of available recipes' cand --variables 'List names of variables' + cand -g 'Invoke using a global `justfile`' + cand --global 'Invoke using a global `justfile`' cand -h 'Print help information' cand --help 'Print help information' cand -V 'Print version information' diff --git a/completions/just.fish b/completions/just.fish index 1ec8057696..eb9e235f9e 100644 --- a/completions/just.fish +++ b/completions/just.fish @@ -74,5 +74,6 @@ complete -c just -n "__fish_use_subcommand" -l init -d 'Initialize new justfile complete -c just -n "__fish_use_subcommand" -s l -l list -d 'List available recipes and their arguments' complete -c just -n "__fish_use_subcommand" -l summary -d 'List names of available recipes' complete -c just -n "__fish_use_subcommand" -l variables -d 'List names of variables' +complete -c just -n "__fish_use_subcommand" -s g -l global -d 'Invoke using a global `justfile`' complete -c just -n "__fish_use_subcommand" -s h -l help -d 'Print help information' complete -c just -n "__fish_use_subcommand" -s V -l version -d 'Print version information' diff --git a/completions/just.powershell b/completions/just.powershell index cf3b6da555..c1911c9216 100644 --- a/completions/just.powershell +++ b/completions/just.powershell @@ -68,6 +68,8 @@ Register-ArgumentCompleter -Native -CommandName 'just' -ScriptBlock { [CompletionResult]::new('--list', 'list', [CompletionResultType]::ParameterName, 'List available recipes and their arguments') [CompletionResult]::new('--summary', 'summary', [CompletionResultType]::ParameterName, 'List names of available recipes') [CompletionResult]::new('--variables', 'variables', [CompletionResultType]::ParameterName, 'List names of variables') + [CompletionResult]::new('-g', 'g', [CompletionResultType]::ParameterName, 'Invoke using a global `justfile`') + [CompletionResult]::new('--global', 'global', [CompletionResultType]::ParameterName, 'Invoke using a global `justfile`') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information') diff --git a/completions/just.zsh b/completions/just.zsh index a8d1d7f1ec..7fb46cc40a 100644 --- a/completions/just.zsh +++ b/completions/just.zsh @@ -64,6 +64,8 @@ _just() { '--list[List available recipes and their arguments]' \ '--summary[List names of available recipes]' \ '--variables[List names of variables]' \ +'-g[Invoke using a global `justfile`]' \ +'--global[Invoke using a global `justfile`]' \ '-h[Print help information]' \ '--help[Print help information]' \ '-V[Print version information]' \