Skip to content

Commit

Permalink
Merge #3054
Browse files Browse the repository at this point in the history
3054: Allow bash completions to work with an alias r=pksunkara a=kurtbuilds



Co-authored-by: Kurt Wolf <kurtwolfbuilds@gmail.com>
  • Loading branch information
bors[bot] and kurtbuilds committed Nov 28, 2021
2 parents 6fae3f1 + 36a6360 commit 39374ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clap_generate/src/generators/shells/bash.rs
Expand Up @@ -33,7 +33,7 @@ impl Generator for Bash {
for i in ${{COMP_WORDS[@]}}
do
case \"${{i}}\" in
{name})
\"$1\")
cmd=\"{cmd}\"
;;{subcmds}
*)
Expand Down
6 changes: 3 additions & 3 deletions clap_generate/tests/completions/bash.rs
Expand Up @@ -42,7 +42,7 @@ static BASH: &str = r#"_myapp() {
for i in ${COMP_WORDS[@]}
do
case "${i}" in
myapp)
"$1")
cmd="myapp"
;;
help)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -285,7 +285,7 @@ static BASH_ALIASES: &str = r#"_cmd() {
for i in ${COMP_WORDS[@]}
do
case "${i}" in
cmd)
"$1")
cmd="cmd"
;;
*)
Expand Down

0 comments on commit 39374ac

Please sign in to comment.