From eb7c534a53c874dd0686a46f36fe2801cb6fa9ee Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 24 May 2011 01:43:22 +0000 Subject: 29335: update valgrind --tool= completion hack. --- Completion/Linux/Command/_valgrind | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Completion/Linux') 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 -- cgit 1.4.1