mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
Allow bash completions to work with an alias (clap-rs/clap#2054)
This commit is contained in:
parent
bc4c29056f
commit
a9f4d759c0
2 changed files with 4 additions and 4 deletions
|
@ -33,7 +33,7 @@ impl Generator for Bash {
|
|||
for i in ${{COMP_WORDS[@]}}
|
||||
do
|
||||
case \"${{i}}\" in
|
||||
{name})
|
||||
\"$1\")
|
||||
cmd=\"{cmd}\"
|
||||
;;{subcmds}
|
||||
*)
|
||||
|
|
|
@ -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"
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Reference in a new issue