From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29057 invoked by alias); 23 May 2011 00:26:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29335 Received: (qmail 28150 invoked from network); 23 May 2011 00:26:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.214.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:x-mailer :in-reply-to:references; bh=DdA/gZOXRepV7UICd0m5ApyUM6qmKiY6GdCyidjOLMQ=; b=IX3OnXwk5evgaD7AmMqwjcDBvx+VkI48JRnFrDImfKWxlierf2eckerDdY8vzD53oM hFtWu0SITfuiHKbxJ4Nrh2PS9Ofou4zF/HBuJc+zHlPmoqJUUyfI45eR0lW6ZZ5oTTH3 AUe9ExhbmGT6/NC2YbVcO6oEeDn61vPgWojRE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; b=eBfoEjE9DnMd7e6cz62eU7PWTAXM7xo2OkwKFdEXAcKcWz/b+nYAe7RiGs/07l1PvH I9cW6c/OyObyIlB9FYQVDugDfCyWI0XWO+MMJQOO7EzvFtw5gGO6gXOnvLJ/rAG2U6hX 8tTNX7ICr52NGqQYZP/CUoVPBaWN3KdeCW/OM= From: Mikael Magnusson To: zsh-workers@zsh.org Subject: PATCH: Update horrible hack for completing valgrind tools Date: Mon, 23 May 2011 02:21:08 +0200 Message-Id: <1306110068-21701-1-git-send-email-mikachu@gmail.com> X-Mailer: git-send-email 1.7.4-rc1 In-Reply-To: <237967ef0910180426i2a06405escda6007a0c9d3e87@mail.gmail.com> References: <237967ef0910180426i2a06405escda6007a0c9d3e87@mail.gmail.com> On 18 October 2009 13:26, Mikael Magnusson wrote: > > I also noticed --tool no longer works, it seems the files have > -x86-linux appended to them, so I tried this fix, but :s doesn't do > anything. > [horrible patch] > > if I run it at the command prompt, it does work though, and I can't > recall any option that turns off :s// there. I remembered now, it's histsubstpattern ;). --- Completion/Linux/Command/_valgrind | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) also horrible patch: diff --git a/Completion/Linux/Command/_valgrind b/Completion/Linux/Command/_valgrind index 34d2f77..0284ff8 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 -- 1.7.4-rc1