From ab7ec8d9851fea8230e1ccfba284c5bfaf457d88 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 3 May 2015 16:53:47 +0200 Subject: 35011: update completions for some common Unix commands, in particular improving FreeBSD support --- Completion/Unix/Command/_ldd | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'Completion/Unix/Command/_ldd') diff --git a/Completion/Unix/Command/_ldd b/Completion/Unix/Command/_ldd index 381d12745..19b8a9105 100644 --- a/Completion/Unix/Command/_ldd +++ b/Completion/Unix/Command/_ldd @@ -1,6 +1,6 @@ #compdef ldd -if _pick_variant gnu='(GNU|EGLIBC|Gentoo)' solaris --version; then +if _pick_variant gnu='(GNU|EGLIBC|Gentoo)' unix --version; then args=( '(- *)--version[display version information]' '(- *)--help[display help information]' @@ -10,20 +10,31 @@ if _pick_variant gnu='(GNU|EGLIBC|Gentoo)' solaris --version; then '(-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]' - ) + case $OSTYPE in + solaris*) + 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]' + ) + ;; + freebsd*) + args=( + '-a[show all objects that are needed by each loaded object]' + '-v[verbose listing of the dynamic linking headers]' + '-f+[specify format]:format:((%a\:program\ name %A\:environment\ name %o\:library\ name %p\:path\ to\ library %x\:load\ address))' + ) + ;; + esac fi _arguments $args \ -- cgit v1.2.3