Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Update horrible hack for completing valgrind tools
- X-seq: zsh-workers 29335
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: Update horrible hack for completing valgrind tools
- Date: Mon, 23 May 2011 02:21:08 +0200
- 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=
- In-reply-to: <237967ef0910180426i2a06405escda6007a0c9d3e87@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <237967ef0910180426i2a06405escda6007a0c9d3e87@mail.gmail.com>
On 18 October 2009 13:26, Mikael Magnusson <mikachu@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author