From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28250 invoked by alias); 7 Jan 2018 06:59:30 -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: 42242 Received: (qmail 21091 invoked by uid 1010); 7 Jan 2018 06:59:30 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot0-f193.google.com 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(74.125.82.193):SA:0(-1.7/5.0):. Processed in 2.484729 secs); 07 Jan 2018 06:59:30 -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.7 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: phy1729@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KxM2GiFMcsJ2++cKl2W58+NDTLD2rrnyDV3fNry6V1s=; b=hRPrpe3y448BGOgfOdpt4feBBsy/s+E69HHCP/IZYonvAnKYU6+fZ4dgsr78JGp1NS 9Pm+KBDJVPYaQrI1Uu9GFKb9SUsLlEdKN3fJYLdLNiH9pXq2RpQBM0kdkARGsd31YwBj 8NfcG6ZWbUAXeJgCrUAi33t5Dxgp37uTccy+xbmQw+MPrHjgynqbHDCOUG+mh0WlFUOj JzfMaFbR7sSblf0j9igAfi2NZkuxc/ukv2GoZnxLGIfAn/Rza94A2V2uL9QDewEAlEMn 80aKIPZkWvoCvdFtsefE1DNe+74gowgsL4yRocank2bF5niyefJ27YTYvrHsb6DUbbWk FxZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=KxM2GiFMcsJ2++cKl2W58+NDTLD2rrnyDV3fNry6V1s=; b=q0tcIQeqB6TmxMN7m8Bn7IrlDiFnKR09usvYRMJ8kXNYgRk6cfBzY51ecOIc+76YU1 Rf2q4WP6+5TG5Ygcf0a7iibmT8h1MY2J1/GZtRwAX/vjqNRwOLL0BhoO5kKbTxF4gXNO ACjYwQGz5KQPQXVlxrojFzbccz/apFb3hDMboDHYN0Jc1i4XSVRXpcL5Ux7wLGjTjbLx T8L/udzjJqIDXIpuYoeIpP5QqlaJpS+YwUWtIinCCb05jm2ovY6N88nx88jA+qCgKsXa loIatv535SiMy6S5z3MzPK3D7A5fcWX6FWSvqL5YNV+mrI3J2sOAI34y6vZA14IoapYt A5CA== X-Gm-Message-State: AKwxytcLo+K/bAoYibfxMVwP/WLXCwet75GO9f/aPOF62/COY/40iH/L ZldZwfGOvzMAPqT7deirN4ehwRNG X-Google-Smtp-Source: ACJfBovEpwRvZt1OMXz3//001r8+I1ec3uCwnroqQjkIlv0nGnu2OjRhmsCi5T5qkxZU7ghLFXy+eg== X-Received: by 10.157.83.4 with SMTP id g4mr457725oth.264.1515308363845; Sat, 06 Jan 2018 22:59:23 -0800 (PST) Date: Sun, 7 Jan 2018 00:59:22 -0600 From: Matthew Martin To: zsh-workers@zsh.org Subject: Re: [patch] Add BSDs to _ldconfig Message-ID: <20180107065922.GA92097@CptOrmolo.darkstar> Mail-Followup-To: zsh-workers@zsh.org References: <20180107043536.GA58441@CptOrmolo.darkstar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180107043536.GA58441@CptOrmolo.darkstar> User-Agent: Mutt/1.9.2 (2017-12-15) On Sat, Jan 06, 2018 at 10:35:36PM -0600, Matthew Martin wrote: > Move _ldconfig to Unix and add [DFNO]BSD to the mix. Thanks to Dana for > review. > > - Matthew Martin Accidentally included -v twice. diff --git a/Completion/Linux/Command/_ldconfig b/Completion/Linux/Command/_ldconfig deleted file mode 100644 index 5f4802f91..000000000 --- a/Completion/Linux/Command/_ldconfig +++ /dev/null @@ -1,35 +0,0 @@ -#compdef ldconfig ldconfig.real - -local ret=1 -local -a context line state state_descr -local -A opt_args - -_arguments -s -S : \ - '(x -v --verbose)'{-v,--verbose}'[output verbosely]' \ - '(x)*: :->files' \ - + x \ - '(: -)'{-\?,--help}'[display help information]' \ - '(: -)'{-p,--print-cache}'[display libraries in current cache]' \ - '(: -)--usage[display brief usage information]' \ - '(: -)'{-V,--version}'[display version information]' \ - + l \ - '(x o)-l[manually link individual libraries (library mode)]' \ - + o \ - '(x l -c --format)'{-c+,--format=}'[specify cache format]:cache format:(old new compat)' \ - '(x l)-C+[specify cache file to use instead of /etc/ld.so.cache]:cache file:_files' \ - '(x l)-f+[specify configuration file to use instead of /etc/ld.so.conf]:configuration file:_files' \ - '(x l -i --ignore-aux-cache)'{-i,--ignore-aux-cache}'[ignore auxiliary cache file]' \ - '(x l -N)-n[process only directories specified on command line (implies -N)]' \ - '(x l)-N[do not rebuild cache]' \ - '(x l)-r+[specify root directory]:root directory:_directories' \ - '(x l)-X[do not update symbolic links]' \ -&& ret=0 - -[[ $state == files ]] && -if [[ -n ${opt_args[(I)l--l]} ]]; then - _object_files && ret=0 -else - _directories && ret=0 -fi - -return ret diff --git a/Completion/Unix/Command/_ldconfig b/Completion/Unix/Command/_ldconfig new file mode 100644 index 000000000..3c3fca538 --- /dev/null +++ b/Completion/Unix/Command/_ldconfig @@ -0,0 +1,81 @@ +#compdef ldconfig ldconfig.real + +local ret=1 +local -a args context line state state_descr +local -A opt_args + +case $OSTYPE in + linux*) + args=( + '(x -v --verbose)'{-v,--verbose}'[output verbosely]' \ + + x \ + '(: -)'{-\?,--help}'[display help information]' + '(: -)'{-p,--print-cache}'[display libraries in current cache]' + '(: -)--usage[display brief usage information]' + '(: -)'{-V,--version}'[display version information]' + + l + '(x o)-l[manually link individual libraries (library mode)]' + + o + '(x l -c --format)'{-c+,--format=}'[specify cache format]:cache format:(old new compat)' + '(x l)-C+[specify cache file to use instead of /etc/ld.so.cache]:cache file:_files' + '(x l)-f+[specify configuration file to use instead of /etc/ld.so.conf]:configuration file:_files' + '(x l -i --ignore-aux-cache)'{-i,--ignore-aux-cache}'[ignore auxiliary cache file]' + '(x l -N)-n[process only directories specified on command line (implies -N)]' + '(x l)-N[do not rebuild cache]' + '(x l)-r+[specify root directory]:root directory:_directories' + '(x l)-X[do not update symbolic links]' + ) + ;; + *bsd*|dragonfly*) + args=( + '(-U)-m[merge into the existing hints file]' + '(: -)-r[list the current contents of the hints file]' + );| + dragonfly*|freebsd*|openbsd*) + args+=( + '(-U)-R[rescan previously configured directories]' + );| + dragonfly*|freebsd*) + args+=( + '(-aout)-elf[generate hints for elf format shared libraries]' + '-f+[specify hints file]:hints file:_files' + '-i[run in insecure mode]' + );| + freebsd*|netbsd*|openbsd*) + args+=( + '-v[switch on verbose mode]' + );| + freebsd*|openbsd*) + args+=( + '-s[do not scan /usr/lib for shared libraries]' + );| + freebsd*) + args+=( + '-32[generate hints for 32-bit ABI shared libraries]' + '(-elf)-aout[generate hints for a.out format shared libraries]' + );| + netbsd*) + args+=( + '(-s)-c[do not scan directories in /etc/ls.so.conf]' + '(-s)-S[do not scan /usr/lib for shared libraries]' + '-s[do not scan /usr/lib or directories in /etc/ld.so.conf for shared libraries]' + );| + openbsd*) + args+=( + '(-m)-U[unconfigure specified directories or inaccessable directories if none specified]' + );| +esac + +_arguments -s -S : \ + '(x)*: :->files' \ + $args \ +&& ret=0 + +[[ $state == files ]] && +if [[ -n ${opt_args[(I)l--l]} ]]; then + _object_files && ret=0 +else + _directories && ret=0 +fi + +return ret