From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7320 invoked from network); 18 Oct 2009 11:27:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from bifrost.dotsrc.org (130.225.254.106) by ns1.primenet.com.au with SMTP; 18 Oct 2009 11:27:38 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: from sunsite.dk (blue.dotsrc.org [130.225.254.126]) by bifrost.dotsrc.org (Postfix) with SMTP id 2CF6E801CDAC for ; Sun, 18 Oct 2009 13:27:08 +0200 (CEST) Received: (qmail 24703 invoked by alias); 18 Oct 2009 11:26:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27312 Received: (qmail 24682 invoked from network); 18 Oct 2009 11:26:19 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 Oct 2009 11:26:19 -0000 Received: from mail-ew0-f225.google.com (mail-ew0-f225.google.com [209.85.219.225]) by bifrost.dotsrc.org (Postfix) with ESMTP id 89BDD801CDAC for ; Sun, 18 Oct 2009 13:26:13 +0200 (CEST) Received: by ewy25 with SMTP id 25so3406685ewy.45 for ; Sun, 18 Oct 2009 04:26:13 -0700 (PDT) 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= MIME-Version: 1.0 Received: by 10.211.174.13 with SMTP id b13mr4096684ebp.73.1255865173144; Sun, 18 Oct 2009 04:26:13 -0700 (PDT) Date: Sun, 18 Oct 2009 13:26:13 +0200 Message-ID: <237967ef0910180426i2a06405escda6007a0c9d3e87@mail.gmail.com> Subject: valgrind completion, order of completed values From: Mikael Magnusson To: zsh-workers Content-Type: text/plain; charset=UTF-8 X-Virus-Scanned: ClamAV 0.94.2/9908/Sat Oct 17 11:07:01 2009 on bifrost X-Virus-Scanned: ClamAV 0.94.2/9908/Sat Oct 17 11:07:01 2009 on bifrost X-Virus-Status: Clean 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