Allow bash completions to work with an alias (clap-rs/clap#2054)

This commit is contained in:
Kurt Wolf 2021-11-28 12:15:08 -05:00 committed by Ed Page
parent bc4c29056f
commit a9f4d759c0
2 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,7 @@ impl Generator for Bash {
for i in ${{COMP_WORDS[@]}}
do
case \"${{i}}\" in
{name})
\"$1\")
cmd=\"{cmd}\"
;;{subcmds}
*)

View file

@ -42,7 +42,7 @@ static BASH: &str = r#"_myapp() {
for i in ${COMP_WORDS[@]}
do
case "${i}" in
myapp)
"$1")
cmd="myapp"
;;
help)
@ -139,7 +139,7 @@ static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
for i in ${COMP_WORDS[@]}
do
case "${i}" in
my_app)
"$1")
cmd="my_app"
;;
help)
@ -285,7 +285,7 @@ static BASH_ALIASES: &str = r#"_cmd() {
for i in ${COMP_WORDS[@]}
do
case "${i}" in
cmd)
"$1")
cmd="cmd"
;;
*)