fix: Respect ValueHint::Other in bash

This commit is contained in:
clubby789 2023-05-09 19:59:56 +01:00
parent 0174326fa6
commit 2f97216156
2 changed files with 3 additions and 1 deletions

View file

@ -206,6 +206,8 @@ fn vals_for(o: &Arg) -> String {
.collect::<Vec<_>>()
.join(" ")
)
} else if o.get_value_hint() == ValueHint::Other {
String::from("\"${cur}\"")
} else {
String::from("$(compgen -f \"${cur}\")")
}

View file

@ -34,7 +34,7 @@ _my-app() {
return 0
;;
--other)
COMPREPLY=($(compgen -f "${cur}"))
COMPREPLY=("${cur}")
return 0
;;
--path)