From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28374 invoked by alias); 31 Dec 2017 02:57:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42191 Received: (qmail 3733 invoked by uid 1010); 31 Dec 2017 02:57:22 -0000 X-Qmail-Scanner-Diagnostics: from rcpt-expgw.biglobe.ne.jp by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(133.208.98.1):SA:0(-1.9/5.0):. Processed in 11.021839 secs); 31 Dec 2017 02:57:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: takimoto-j@kba.biglobe.ne.jp X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Biglobe-Sender: From: "Jun T." Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: [PATCH] new completion for otool command (macOS) Message-Id: Date: Sun, 31 Dec 2017 11:57:06 +0900 To: "zsh-workers@zsh.org" Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) X-Biglobe-Spnum: 59920 diff --git a/Completion/Darwin/Command/_otool = b/Completion/Darwin/Command/_otool new file mode 100644 index 0000000..52f2e48 --- /dev/null +++ b/Completion/Darwin/Command/_otool @@ -0,0 +1,47 @@ +#compdef otool +# +local opts args files variant curcontext=3D$context state state_descr = line +typeset -A opt_args + +_arguments \ + '-a[display the archive header]' \ + '-S[display the contents of the __.SYMDEF file]' \ + '-f[display the universal headers]' \ + '-h[display the Mach header]' \ + '-l[display the load commands]' \ + '-L[display names and versions of shared libs that the object file = uses]' \ + '-D[display just the internal name of shared lib]' \ + '-s[display the contents of the specified section]:segment name: = :section name: ' \ + '-t[display the contents of (__TEXT,__text) section]' \ + '-d[display the contents of (__DATA,__data) section]' \ + '-o[display the contents of __OBJC segment]' \ + '-r[display the relocation entries]' \ + '-c[display the argument strings from a core file]' \ + '-I[display the indirect symbol table]' \ + '-T[display the table of contents for a dynamic shared library]' \ + '-R[display the reference table of a dynamic shared library]' \ + '-M[display the module table of dymamic shared library]' \ + '-H[display the two-level namespace hints table]' \ + '-G[display the data in code table]' \ + '-C[display the linker optimization hints]' \ + '-P[print the info_plist section as strings]' \ + '-p[with -t and -v/V: start disassembly from the specified = symbol]:symbol name: ' \ + '-v[display verbosely (symbolically) when possible]' \ + '-V[display disassembled operands symbolically]' \ + "-X[don't print leading addresses/headers with disassembly]" \ + '-q[use the llvm disassembler (default)]' \ + '-mcpu=3D[use the specified cpu for the llvm = disassembler]:target:->targets' \ + '-function_offsets[with disassembly, print decimal offset from the = last label]' \ + '-j[with disassembly, print opcode bytes]' \ + "-Q[use otool's disassembler]" \ + '-arch[select the specified architecture from a universal = file]:arch:(i386 x86_64)' \ + '-m[object file names are not assuemd to be in archive(member) = syntax]' \ + '(- *)--version[print version of otool]' \ + '*:file:_object_files' && return 0 + +case $state in + targets) + _values "target architecture" "${(z)${(@)${(f)$(_call_program = targets + ${~words[1]} --version 2>/dev/null)##*Registered Targets:}/ -*}}" + ;; +esac