From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4015 invoked from network); 3 Sep 2000 21:43:59 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Sep 2000 21:43:59 -0000 Received: (qmail 5364 invoked by alias); 3 Sep 2000 21:43:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12728 Received: (qmail 5357 invoked from network); 3 Sep 2000 21:43:49 -0000 Date: Sun, 3 Sep 2000 17:43:46 -0400 From: Clint Adams To: zsh-workers@sunsite.auc.dk Subject: PATCH: man -l (local-file) completion Message-ID: <20000903174346.A17438@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i This is a quick hack to have files completed for 'man -l' rather than manpages. This is good for the man-db used by Debian. The only other man I can think of that uses -l is Solaris, and though it has a different meaning, I don't think completing manpages nor filenames is particularly useful there, so this shouldn't really hurt. This should naturally be subsumed by more comprehensive options handling. Index: Completion/User/_man =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/User/_man,v retrieving revision 1.5 diff -u -r1.5 _man --- Completion/User/_man 2000/07/19 09:03:30 1.5 +++ Completion/User/_man 2000/09/03 21:37:42 @@ -4,6 +4,10 @@ local rep expl star approx mrd +if [[ $words[1] == man ]] && (( $words[(I)-l] + $words[(I)--local-file] )); then + _files || return 0 +fi + if [[ $compstate[pattern_match] != [^*] ]]; then # If a string other than *, we just want correction, so no `*'. star='*'