diff options
author | Clint Adams <clint@users.sourceforge.net> | 2005-04-17 13:40:23 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2005-04-17 13:40:23 +0000 |
commit | 54614a941b4e0048c6ef9f5f12f9ec581920a856 (patch) | |
tree | b00a4e170ce27f008e11f915df345c744e537af2 | |
parent | 318b52969b3f186da460e4acf99072962ec94e66 (diff) | |
download | zsh-54614a941b4e0048c6ef9f5f12f9ec581920a856.tar.gz zsh-54614a941b4e0048c6ef9f5f12f9ec581920a856.tar.xz zsh-54614a941b4e0048c6ef9f5f12f9ec581920a856.zip |
* 21150: Completion/Unix/Command/_baz, Completion/Unix/Command/_tla:
handle parsing of subcommand help output a bit more sanely.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Completion/Unix/Command/_baz | 4 | ||||
-rw-r--r-- | Completion/Unix/Command/_tla | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 5edc0fd30..2d49c5971 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-04-17 Clint Adams <clint@zsh.org> + + * 21150: Completion/Unix/Command/_baz, + Completion/Unix/Command/_tla: handle parsing of subcommand help + output a bit more sanely. + 2005-04-16 Bart Schaefer <schaefer@zsh.org> * unposted (see 21148): Test/A04redirect.ztst: update test for diff --git a/Completion/Unix/Command/_baz b/Completion/Unix/Command/_baz index c5a65437a..a15596488 100644 --- a/Completion/Unix/Command/_baz +++ b/Completion/Unix/Command/_baz @@ -490,8 +490,7 @@ _baz_main () { arguments=() local input - input=(${${(f)"$($BAZ $cmd -h)"}# }) - shift 6 input + input=(${${(M)${(f)"$($BAZ $cmd -h)"}:# *}# }) local i j=1 local short long arg desc action @@ -513,6 +512,7 @@ _baz_main () { (( i++ )) desc[j]="$desc[j] ${input[i]##* }" fi + [[ "$short[j]" == -[hHV] ]] && continue desc[j]="${${desc[j]//\[/\\[}//\]/\\]}" # escape brackets case $arg[j] in diff --git a/Completion/Unix/Command/_tla b/Completion/Unix/Command/_tla index 876f9dcf3..a047d1dd1 100644 --- a/Completion/Unix/Command/_tla +++ b/Completion/Unix/Command/_tla @@ -527,8 +527,7 @@ _tla_main () { arguments=() local input - input=(${${(f)"$($TLA $cmd -h)"}# }) - shift 6 input + input=(${${(M)${(f)"$($TLA $cmd -h)"}:# *}# }) local i j=1 local short long arg desc action @@ -550,6 +549,7 @@ _tla_main () { (( i++ )) desc[j]="$desc[j] ${input[i]##* }" fi + [[ "$short[j]" == -[hHV] ]] && continue desc[j]="${${desc[j]//\[/\\[}//\]/\\]}" # escape brackets case $arg[j] in |