mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
fix: bash completion fallback in nounset
mode
With the shell in `nounset` mode, the intended fallback to filename completion provokes an error: ``` $ cargo foo <TAB>bash: !opt_var: unbound variable ```
This commit is contained in:
parent
631b077003
commit
c1ffe80d61
@ -154,7 +154,7 @@ _cargo()
|
||||
else
|
||||
local opt_var=opt__${cmd//-/_}
|
||||
fi
|
||||
if [[ -z "${!opt_var}" ]]; then
|
||||
if [[ -z "${!opt_var-}" ]]; then
|
||||
# Fallback to filename completion.
|
||||
_filedir
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user