From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28361 invoked by alias); 12 Jul 2013 07:11:54 -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: X-Seq: 31512 Received: (qmail 28599 invoked from network); 12 Jul 2013 07:11:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at websitewelcome.com designates 67.18.144.11 as permitted sender) Message-ID: <51DFA641.6080204@goots.org> Date: Fri, 12 Jul 2013 07:46:25 +0100 From: Nick Cross User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: [PATCH] Update make completion with gnu options Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3039.hostgator.com X-AntiAbuse: Original Domain - zsh.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - goots.org X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.0.47]) [94.170.26.95]:50096 X-Source-Auth: goots@goots.org X-Email-Count: 1 X-Source-Cap: cm5jO3JuYztnYXRvcjMwMzkuaG9zdGdhdG9yLmNvbQ== Hi, Here are the additional commands for make. Thanks to Bart Schaefer who helped with correcting the make completion. I *think* its correct now ;-) Hope it helps, Regards Nick ======= commit 6245a950510bb47611d2cc2a660c21c2d82a2ca5 Author: Nick Cross Date: Thu Jul 11 22:07:18 2013 +0100 Update make completion with gnu options diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make index 72d16bb..5dd0a21 100644 --- a/Completion/Unix/Command/_make +++ b/Completion/Unix/Command/_make @@ -158,13 +158,36 @@ _make() { if [[ $is_gnu == gnu ]] then incl="(-|)include" - # TBD: update option_specs option_specs=( - '-C[change directory first]:directory:->dir' - '-I[include directory for makefiles]:directory:->dir' - '-f[specify makefile]:makefile:->file' - '-o[specify file not to remake]:file not to remake:->file' - '-W[pretend file was modified]:file to treat as modified:->file' + {-B,--always-make}'[Unconditionally make all targets]' + {-C,--directory=}'[change directory first]:directory:->dir' + '-d[Print lots of debug information]' + '--debug=-[Print various types of debug information]:FLAGS' + {-e,--environment-overrides}'[Environment variables override makefiles]' + '--eval=-[Evaluate STRING as a makefile statement]:STRING' + {-f,--file=,--makefile=}'[Read FILE as a makefile]:file:->file' + '-h[Print this message and exit]' + {-i,--ignore-errors}'[Ignore errors from recipes]' + {-I,--include-dir=}'[Search DIRECTORY for included makefiles]:directory:->dir' + {-j,--jobs=}'[Allow N jobs at once; infinite jobs with no arg]:number of jobs' + {-k,--keep-going}"[Keep going when some targets can't be made]" + {-l,--load-average=,--max-load}"[Don't start multiple jobs unless load is below N]:load" + {-L,--check-symlink-times}'[Use the latest mtime between symlinks and target]' + {-n,--just-print,--dry-run,--recon}"[Don't actually run any recipe; just print them]" + {-o,--old-file=,--assume-old=}"[Consider FILE to be very old and don't remake it]:file not to remake:->file" + {-p,--print-data-base}'[Print makes internal database]' + {-q,--question}'[Run no recipe; exit status says if up to date]' + {-r,--no-builtin-rules}'[Disable the built-in implicit rules]' + {-R,--no-builtin-variables}'[Disable the built-in variable settings]' + {-s,--silent,--quiet}"[Don't echo recipes]" + {-S,--no-keep-going,--stop}'[Turns off -k]' + {-t,--touch}'[Touch targets instead of remaking them]' + {-v,--version}'[Print the version number of make and exit]' + {-w,--print-directory}'[Print the current directory]' + '--no-print-directory[Turn off -w, even if it was turned on implicitly]' + {-W,--what-if=,--new-file=,--asume-new=}'[Consider FILE to be infinitely new]:file to treat as modified:->file' + '--warn-undefined-variables[Warn when an undefined variable is referenced]' + '--warn-undefined-functions[Warn when an undefined user function is called]' ) else # Basic make options only. @@ -191,8 +214,7 @@ _make() { ;; (target) - file=($opt_args[(K)(-f|--file|--makefile)]) - file=$file[1] + file=${(v)opt_args[(I)(-f|--file|--makefile)]} if [[ -n $file ]] then [[ $file == [^/]* ]] && file=${(q)$(_make-findBasedir $words)}/$file