Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
valgrind completion, order of completed values
- X-seq: zsh-workers 27312
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: valgrind completion, order of completed values
- Date: Sun, 18 Oct 2009 13:26:13 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=l/oJ5QICskHyB7/RuRD9vJwCBjGvV1tC6uM3hgXw/ec=; b=OFp9vI225YjQj8o1C9MgiH1vBOgMoLQwNn359SjQkYsetIgxzmrpLfG5tLEUuaKEj0 wK0+SgOnFQRDSWvDj3Yua+lQGm8sWKlXGkwFSaakYRrTfEwoecycAiX8wkOTgoGPSsKh Emb0yJMAo4pi57gK/RWOBhzJfeaME+riMvtVk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=oD28is5HbXt1pKOCZpuXTYsIGmt7yh/VQiAsjSl8nxWWfdKBlvchYXwdP9DnWJCEG8 VJE8sE1yxNl9OX7v6YaopFP4TtZK18nh7Mwy6IapeeEqOD34R/UK9QtekPrAAkgUl8ex Xg8QCsVl2mwxFdXddHlrBNyTjkh/q+Nk3tPZY=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I noticed the --read-var-info option wasn't completed and went to add
it, when I noticed the completion function has (yes no), but when
completing the no comes first, presumably alphabetical sorting is done
somewhere. This is also a bit weird for ones like (low med high) and
(no some all). Is there any way to work around that? I also noticed
--leak-resolution was missing the description so (low med high) was
actually displayed as the description and nothing was completed.
Here's a patch for these two.
diff --git a/Completion/Linux/Command/_valgrind
b/Completion/Linux/Command/_valgrind
index 3da65e9..486010b 100644
--- a/Completion/Linux/Command/_valgrind
+++ b/Completion/Linux/Command/_valgrind
@@ -20,6 +20,10 @@ common=(
'--alignment=-[set minimum alignment of allocations]:number'
)
+common_read_varinfo=(
+ '--read-var-info=-[read DWARF3 debug info]:enable:(yes no)'
+)
+
common_mem_null=(
'--xml=-[output everything in XML]:enable:(yes no)'
'--xml-user-comment=-[copy specified string verbatim to XML output]:string'
@@ -31,13 +35,14 @@ args_addrcheck=(
'--partial-loads-ok=-:enable:(yes no)'
'--freelist-vol=-[volume of freed blocks queue]:blocks'
'--leak-check=-[search for memory leaks at exit]:enable:(yes no)'
- '--leak-resolution=-[how much bt merging in leak check]:(low med high)'
+ '--leak-resolution=-[how much bt merging in leak check]:level:(low med high)'
'--show-reachable=-[show reachable blocks in leak check]:enable:(yes no)'
'--workaround-gcc296-bugs=-:enable:(yes no)'
)
args_memcheck=(
$args_addrcheck
+ $common_read_varinfo
)
args_cachegrind=(
@@ -48,6 +53,7 @@ args_cachegrind=(
args_helgrind=(
$common
+ $common_read_varinfo
'--private-stacks=-[assume thread stacks are used privately]:enable:(yes no)'
'--show-last-access=-[show location of last word access on
error]:locations:(no some all)'
)
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.
@@ -112,7 +118,7 @@ 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))
+ tools=(${${${(M)${(f)"$(_call_program tools valgrind
--tool=something -d 2>&1)"}:#*launcher launching
*something*}##*launcher launching }%%something*}*~*.so(*:t:s/-*//))
_wanted tools exl 'valgrind tool' compadd $tools && return
fi
if I run it at the command prompt, it does work though, and I can't
recall any option that turns off :s// there.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author