diff --git a/src/etc/cargo.bashcomp.sh b/src/etc/cargo.bashcomp.sh index c0ba62752c0..dad16dd99e3 100644 --- a/src/etc/cargo.bashcomp.sh +++ b/src/etc/cargo.bashcomp.sh @@ -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