diff --git a/completions/just.bash b/completions/just.bash index 6dca00b..1a47568 100644 --- a/completions/just.bash +++ b/completions/just.bash @@ -31,7 +31,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 -h -V -f -d -c -s -E --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 ... " if [[ ${cur} == -* ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -134,6 +134,10 @@ _just() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + -E) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; *) COMPREPLY=() ;; diff --git a/completions/just.elvish b/completions/just.elvish index 49b19a2..804c520 100644 --- a/completions/just.elvish +++ b/completions/just.elvish @@ -33,7 +33,8 @@ edit:completion:arg-completer[just] = [@words]{ cand -s 'Show information about ' cand --show 'Show information about ' cand --dotenv-filename 'Search for environment file named instead of `.env`' - cand --dotenv-path 'Load environment file at instead of searching for one' + cand -E 'Load as environment file instead of searching for one' + cand --dotenv-path 'Load as environment file instead of searching for one' cand --check 'Run `--fmt` in ''check'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.' cand --yes 'Automatically confirm all recipes.' cand -n 'Print what just would do without doing it' diff --git a/completions/just.fish b/completions/just.fish index 1ec8057..d8ee779 100644 --- a/completions/just.fish +++ b/completions/just.fish @@ -50,7 +50,7 @@ complete -c just -n "__fish_use_subcommand" -s c -l command -d 'Run an arbitrary complete -c just -n "__fish_use_subcommand" -l completions -d 'Print shell completion script for ' -r -f -a "zsh bash fish powershell elvish" complete -c just -n "__fish_use_subcommand" -s s -l show -d 'Show information about ' complete -c just -n "__fish_use_subcommand" -l dotenv-filename -d 'Search for environment file named instead of `.env`' -complete -c just -n "__fish_use_subcommand" -l dotenv-path -d 'Load environment file at instead of searching for one' +complete -c just -n "__fish_use_subcommand" -s E -l dotenv-path -d 'Load as environment file instead of searching for one' complete -c just -n "__fish_use_subcommand" -l check -d 'Run `--fmt` in \'check\' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.' complete -c just -n "__fish_use_subcommand" -l yes -d 'Automatically confirm all recipes.' complete -c just -n "__fish_use_subcommand" -s n -l dry-run -d 'Print what just would do without doing it' diff --git a/completions/just.powershell b/completions/just.powershell index cf3b6da..e7b207c 100644 --- a/completions/just.powershell +++ b/completions/just.powershell @@ -38,7 +38,8 @@ Register-ArgumentCompleter -Native -CommandName 'just' -ScriptBlock { [CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Show information about ') [CompletionResult]::new('--show', 'show', [CompletionResultType]::ParameterName, 'Show information about ') [CompletionResult]::new('--dotenv-filename', 'dotenv-filename', [CompletionResultType]::ParameterName, 'Search for environment file named instead of `.env`') - [CompletionResult]::new('--dotenv-path', 'dotenv-path', [CompletionResultType]::ParameterName, 'Load environment file at instead of searching for one') + [CompletionResult]::new('-E', 'E', [CompletionResultType]::ParameterName, 'Load as environment file instead of searching for one') + [CompletionResult]::new('--dotenv-path', 'dotenv-path', [CompletionResultType]::ParameterName, 'Load as environment file instead of searching for one') [CompletionResult]::new('--check', 'check', [CompletionResultType]::ParameterName, 'Run `--fmt` in ''check'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.') [CompletionResult]::new('--yes', 'yes', [CompletionResultType]::ParameterName, 'Automatically confirm all recipes.') [CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Print what just would do without doing it') diff --git a/completions/just.zsh b/completions/just.zsh index a8d1d7f..27e76c0 100644 --- a/completions/just.zsh +++ b/completions/just.zsh @@ -33,8 +33,9 @@ _just() { '--completions=[Print shell completion script for ]: :(zsh bash fish powershell elvish)' \ '-s+[Show information about ]: :_just_commands' \ '--show=[Show information about ]: :_just_commands' \ -'(--dotenv-path)--dotenv-filename=[Search for environment file named instead of `.env`]' \ -'--dotenv-path=[Load environment file at instead of searching for one]' \ +'(-E --dotenv-path)--dotenv-filename=[Search for environment file named instead of `.env`]' \ +'-E+[Load as environment file instead of searching for one]' \ +'--dotenv-path=[Load as environment file instead of searching for one]' \ '--check[Run `--fmt` in '\''check'\'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.]' \ '--yes[Automatically confirm all recipes.]' \ '(-q --quiet)-n[Print what just would do without doing it]' \ diff --git a/src/config.rs b/src/config.rs index 0a07146..2022f27 100644 --- a/src/config.rs +++ b/src/config.rs @@ -395,8 +395,9 @@ impl Config { ) .arg( Arg::with_name(arg::DOTENV_PATH) + .short("E") .long("dotenv-path") - .help("Load environment file at instead of searching for one") + .help("Load as environment file instead of searching for one") .takes_value(true), ) .group(ArgGroup::with_name("SUBCOMMAND").args(cmd::ALL))