From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 716 invoked from network); 28 Jun 2007 16:12:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Jun 2007 16:12:52 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 45641 invoked from network); 28 Jun 2007 16:12:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Jun 2007 16:12:46 -0000 Received: (qmail 15624 invoked by alias); 28 Jun 2007 16:12:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23611 Received: (qmail 15615 invoked from network); 28 Jun 2007 16:12:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Jun 2007 16:12:41 -0000 Received: (qmail 45232 invoked from network); 28 Jun 2007 16:12:40 -0000 Received: from smtp009.mail.ukl.yahoo.com (217.12.11.63) by a.mx.sunsite.dk with SMTP; 28 Jun 2007 16:12:37 -0000 Received: (qmail 58947 invoked from network); 28 Jun 2007 16:12:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-YMail-OSG:Received:From:To:Subject:Date:Message-ID; b=AsfDEg4GRjd11RRoV74KGe9/cBgIH+ABVjpJ0v2iofJyN25BX/61thBdU3sfuliCxBoXDeaElklS3wAvCjfhApyJ9c60as2xypW983g1fsELFYRWkek9yPPK6xmXF2VPFYlSM1wyBFYOi0OU/mhLjQuqVvS/gujj4GpJBtdquN0= ; Received: from unknown (HELO thecus) (okiddle@89.60.236.34 with plain) by smtp009.mail.ukl.yahoo.com with SMTP; 28 Jun 2007 16:12:36 -0000 X-YMail-OSG: hKmv_mMVM1k3UIYSXl38RRkINLEE8Hn.Wp.seloHlS.B_NoUPZxtq8Jb0BfU5sUadFkkfKbe9w-- Received: from opk (helo=thecus) by thecus with local-esmtp (Exim 4.63) (envelope-from ) id 1I3wbu-0003xF-Eb for zsh-workers@sunsite.dk; Thu, 28 Jun 2007 17:12:46 +0100 From: Oliver Kiddle To: Zsh workers Subject: PATCH: ldd and LD_DEBUG completions Date: Thu, 28 Jun 2007 17:12:46 +0100 Message-ID: <15204.1183047166@thecus> Attached are completions for ldd and the LD_DEBUG environment variable. The use of the Unix/Type directory for the latter is perhaps questionable but is probably the best choice. These are based on Linux and Solaris. I would have checked BSD but the sourceforge compile farm has gone. The zsh libraries are not especially cleanly linked by the way. Run ldd -ur (preferably on Solaris) on them to see what I mean. Oliver Index: Completion/Unix/Command/_ldd =================================================================== RCS file: Completion/Unix/Command/_ldd diff -N Completion/Unix/Command/_ldd --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Completion/Unix/Command/_ldd 28 Jun 2007 16:11:00 -0000 @@ -0,0 +1,32 @@ +#compdef ldd + +if _pick_variant gnu=GNU solaris --version; then + args=( + '(- *)--version[display version information]' + '(- *)--help[display help information]' + '(-v --verbose)'{-v,--verbose}'[include symbol versioning information]' + '(-d --data-relocs)'{-d,--data-relocs}'[perform data relocations and report missing objects]' + '(-f --function-relocs)'{-f,--function-relocs}'[perform data/function relocations and report missing objects]' + '(-u --unused)'{-u,--unused}'[display any unused objects]' + ) +else + args=( + -s + '(-r)-d[check immediate references]' + '(-d)-r[check immediate and lazy references]' + '-u[display any unused objects]' + '-U[display any unreferenced, or unused dependencies]' + '-e[set specified environment variable]:environment variable:(LD_PRELOAD LD_LIBRARY_PATH LD_RUN_PATH LD_DEBUG LD_DEBUG_OUTPUT LD_NOCONFIG LD_NOAUXFLTR)' + '-f[check for insecure executable]' + '-i[display order of execution of initialization sections]' + '-L[enable lazy loading]' + '-l[force immediate processing of any filters]' + '-s[display search path used]' + '-v[displays all dependency relationships]' + ) +fi + +_arguments $args \ + '*: : _alternative + "executables:executable:_files -g \^\*.so\(\*\)" + "shared-objects:shared object:_files -g \*.so"' Index: Completion/Unix/Type/_ld_debug =================================================================== RCS file: Completion/Unix/Type/_ld_debug diff -N Completion/Unix/Type/_ld_debug --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Completion/Unix/Type/_ld_debug 28 Jun 2007 16:11:00 -0000 @@ -0,0 +1,39 @@ +#compdef -value-,LD_DEBUG,-default- + +local vals + +vals=( + 'libs[display library search paths]' + 'files[show processing of files and libraries]' + 'bindings[display symbol binding]' + 'reloc[display relocation processing]' + 'symbols[display symbol table processing]' + 'unused[show unused files]' + 'versions[show version processing]' + 'help[display help message]' +) + +case $OSTYPE in + solaris*) + vals+=( + 'basic[provide basic trace information/warnings]' + 'cap[display hardware/software capability processing]' + 'detail[provide more info in conjunction with other options]' + 'demangle[display C++ symbol names in their demangled form]' + 'init[display init and fini processing]' + 'long[display long object names without truncation]' + 'move[display move section processing]' + 'segments[display available output segments and address/offset processing]' + 'strtab[display information about string table compression]' + 'tls[display TLS processing info]' + ) + ;; + linux*) + vals+=( + 'all[combine all options]' + 'statistics[display relocation statistics]' + ) + ;; +esac +_values -s , capability $vals +