diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2011-05-24 01:43:22 +0000 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2011-05-24 01:43:22 +0000 |
commit | eb7c534a53c874dd0686a46f36fe2801cb6fa9ee (patch) | |
tree | af63880c9051299bd07eef19b86bcb1bc7ff2ad7 | |
parent | 4c3efc94cccd4194f1c4e28561a0a1f86f420936 (diff) | |
download | zsh-eb7c534a53c874dd0686a46f36fe2801cb6fa9ee.tar.gz zsh-eb7c534a53c874dd0686a46f36fe2801cb6fa9ee.tar.xz zsh-eb7c534a53c874dd0686a46f36fe2801cb6fa9ee.zip |
29335: update valgrind --tool= completion hack.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Completion/Linux/Command/_valgrind | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index fe0ff909f..dd09a8945 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -2011-05-23 Mikael Magnusson <mikachu@gmail.com> +2011-05-24 Mikael Magnusson <mikachu@gmail.com> + + * 29335: Completion/Linux/Command/_valgrind: Update the hack + for --tool= completion. * 29338: Completion/Base/Core/_main_complete: Correct pattern checking for true value in insert-tab style. @@ -14794,5 +14797,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5322 $ +* $Revision: 1.5323 $ ***************************************************** diff --git a/Completion/Linux/Command/_valgrind b/Completion/Linux/Command/_valgrind index 34d2f774a..0284ff880 100644 --- a/Completion/Linux/Command/_valgrind +++ b/Completion/Linux/Command/_valgrind @@ -118,7 +118,11 @@ if [[ -n "$state" ]]; then # Basically uses debug output to find out the directory where the tools are # present and lists all executables in that directory. # Hope the program provides a neater interface some day! - tools=(${${${(M)${(f)"$(_call_program tools valgrind --tool=something -d 2> /dev/null)"}:#*launcher launching *something}##*launcher launching }%%something}*(*:t)) + () { + setopt localoptions histsubstpattern + tools=( ${${${(M)${(f)"$(_call_program tools valgrind --tool=something -d 2>&1)"}:#*launcher launching *something*}##*launcher launching }%%something*}*~*.*(*:t:s/-*//) ) + typeset -U tools + } _wanted tools exl 'valgrind tool' compadd $tools && return fi |