mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
fix: Respect ValueHint::Other
in bash
This commit is contained in:
parent
0174326fa6
commit
2f97216156
2 changed files with 3 additions and 1 deletions
|
@ -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}\")")
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ _my-app() {
|
|||
return 0
|
||||
;;
|
||||
--other)
|
||||
COMPREPLY=($(compgen -f "${cur}"))
|
||||
COMPREPLY=("${cur}")
|
||||
return 0
|
||||
;;
|
||||
--path)
|
||||
|
|
Loading…
Reference in a new issue