summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Shuklin <george.shuklin@gmail.com>2024-03-19 19:50:34 +0200
committerGitHub <noreply@github.com>2024-03-19 10:50:34 -0700
commit610aa0c52cf8c3d20a79ee641bb9f799ca3027fc (patch)
treedfcc04a4182c0738d8e1b8b0041fb335d3358668
parent1ad1525927d187b6cf8c17fb7e2e647595ac0074 (diff)
Add -E as alias for --dotenv-path (#1910)
-rw-r--r--completions/just.bash6
-rw-r--r--completions/just.elvish3
-rw-r--r--completions/just.fish2
-rw-r--r--completions/just.powershell3
-rw-r--r--completions/just.zsh5
-rw-r--r--src/config.rs3
6 files changed, 15 insertions, 7 deletions
diff --git a/completions/just.bash b/completions/just.bash
index 6dca00b4..1a47568b 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 <ARGUMENTS>... "
+ 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 <ARGUMENTS>... "
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 49b19a25..804c520d 100644
--- a/completions/just.elvish
+++ b/completions/just.elvish
@@ -33,7 +33,8 @@ edit:completion:arg-completer[just] = [@words]{
cand -s 'Show information about <RECIPE>'
cand --show 'Show information about <RECIPE>'
cand --dotenv-filename 'Search for environment file named <DOTENV-FILENAME> instead of `.env`'
- cand --dotenv-path 'Load environment file at <DOTENV-PATH> instead of searching for one'
+ cand -E 'Load <DOTENV-PATH> as environment file instead of searching for one'
+ cand --dotenv-path 'Load <DOTENV-PATH> 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 1ec80576..d8ee779a 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 <SHELL>' -r -f -a "zsh bash fish powershell elvish"
complete -c just -n "__fish_use_subcommand" -s s -l show -d 'Show information about <RECIPE>'
complete -c just -n "__fish_use_subcommand" -l dotenv-filename -d 'Search for environment file named <DOTENV-FILENAME> instead of `.env`'
-complete -c just -n "__fish_use_subcommand" -l dotenv-path -d 'Load environment file at <DOTENV-PATH> instead of searching for one'
+complete -c just -n "__fish_use_subcommand" -s E -l dotenv-path -d 'Load <DOTENV-PATH> 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 cf3b6da5..e7b207cf 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 <RECIPE>')
[CompletionResult]::new('--show', 'show', [CompletionResultType]::ParameterName, 'Show information about <RECIPE>')
[CompletionResult]::new('--dotenv-filename', 'dotenv-filename', [CompletionResultType]::ParameterName, 'Search for environment file named <DOTENV-FILENAME> instead of `.env`')
- [CompletionResult]::new('--dotenv-path', 'dotenv-path', [CompletionResultType]::ParameterName, 'Load environment file at <DOTENV-PATH> instead of searching for one')
+ [CompletionResult]::new('-E', 'E', [CompletionResultType]::ParameterName, 'Load <DOTENV-PATH> as environment file instead of searching for one')
+ [CompletionResult]::new('--dotenv-path', 'dotenv-path', [CompletionResultType]::ParameterName, 'Load <DOTENV-PATH> 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 a8d1d7f1..27e76c07 100644
--- a/completions/just.zsh
+++ b/completions/just.zsh
@@ -33,8 +33,9 @@ _just() {
'--completions=[Print shell completion script for <SHELL>]: :(zsh bash fish powershell elvish)' \
'-s+[Show information about <RECIPE>]: :_just_commands' \
'--show=[Show information about <RECIPE>]: :_just_commands' \
-'(--dotenv-path)--dotenv-filename=[Search for environment file named <DOTENV-FILENAME> instead of `.env`]' \
-'--dotenv-path=[Load environment file at <DOTENV-PATH> instead of searching for one]' \
+'(-E --dotenv-path)--dotenv-filename=[Search for environment file named <DOTENV-FILENAME> instead of `.env`]' \
+'-E+[Load <DOTENV-PATH> as environment file instead of searching for one]' \
+'--dotenv-path=[Load <DOTENV-PATH> 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 0a071463..2022f278 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 <DOTENV-PATH> instead of searching for one")
+ .help("Load <DOTENV-PATH> as environment file instead of searching for one")
.takes_value(true),
)
.group(ArgGroup::with_name("SUBCOMMAND").args(cmd::ALL))