zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: Update horrible hack for completing valgrind tools
Date: Mon, 23 May 2011 02:21:08 +0200	[thread overview]
Message-ID: <1306110068-21701-1-git-send-email-mikachu@gmail.com> (raw)
In-Reply-To: <237967ef0910180426i2a06405escda6007a0c9d3e87@mail.gmail.com>

On 18 October 2009 13:26, Mikael Magnusson <mikachu@gmail.com> 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


      reply	other threads:[~2011-05-23  0:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18 11:26 valgrind completion, order of completed values Mikael Magnusson
2011-05-23  0:21 ` Mikael Magnusson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306110068-21701-1-git-send-email-mikachu@gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).