From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11501 invoked from network); 3 May 2001 13:01:25 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 May 2001 13:01:25 -0000 Received: (qmail 12492 invoked by alias); 3 May 2001 13:01:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14216 Received: (qmail 12480 invoked from network); 3 May 2001 13:01:17 -0000 Sender: kiddleo Message-ID: <3AF1569B.300A92F@u.genie.co.uk> Date: Thu, 03 May 2001 14:01:15 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.dk Subject: Re: PATCH: completion for loadkeys References: <20010502120246.A27456@dman.com> <20010502162301.1343.qmail@web9303.mail.yahoo.com> <20010502134550.A28606@dman.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Clint Adams wrote: > It does. If you tell it to load something that doesn't exist in > /usr/share/lib/keytables, it gets upset. Good. I've patched it to use default completion on other platforms. IRIX doesn't have a loadkeys. I've checked a couple of Solaris versions and they seem to be the same. I've also tweaked a couple of other minor things in the patch. As usual, .distfiles had been forgotten. I tried to find other cases where _guard was needed and only found one - in _pbm. Oliver Index: Completion/Unix/Command/.distfiles =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/.distfiles,v retrieving revision 1.3 diff -u -r1.3 .distfiles --- Completion/Unix/Command/.distfiles 2001/04/13 18:42:15 1.3 +++ Completion/Unix/Command/.distfiles 2001/05/03 12:43:36 @@ -14,4 +14,5 @@ _dd _gprof _lynx _perldoc _telnet _pine _dict _grep _lzop _prcs _tiff _elm _diff _gs _make _psutils _tin _apm _mail +_loadkeys ' Index: Completion/Unix/Command/_loadkeys =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_loadkeys,v retrieving revision 1.2 diff -u -r1.2 _loadkeys --- Completion/Unix/Command/_loadkeys 2001/05/02 16:04:41 1.2 +++ Completion/Unix/Command/_loadkeys 2001/05/03 12:43:36 @@ -1,9 +1,8 @@ #compdef loadkeys -if [[ $OSTYPE == linux* ]] -then - -_arguments \ +case $OSTYPE in + linux*) + _arguments \ '(--clearcompose)-c[clearcompose]' \ '(-c)--clearcompose' \ '(--default)-d[default]' \ @@ -17,10 +16,10 @@ '(--verbose)-v[verbose]' \ '(-v)--verbose' \ ':keymap:_files -W /usr/share/keymaps' - -elif [[ $OSTYPE == solaris* ]] -then - + ;; + solaris*) _files -W /usr/share/lib/keytables + ;; -fi + *) _default;; +esac Index: Completion/Unix/Command/_lp =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_lp,v retrieving revision 1.1 diff -u -r1.1 _lp --- Completion/Unix/Command/_lp 2001/04/02 11:55:42 1.1 +++ Completion/Unix/Command/_lp 2001/05/03 12:43:36 @@ -2,7 +2,7 @@ local expl ret=1 printer list disp strs shown -if compset -P -P || [[ "$words[CURRENT-1]" = -P ]]; then +if compset -P -[dP] || [[ "$words[CURRENT-1]" = -[dP] ]]; then _printers else if [[ "$service" = (lpq|lprm) ]]; then Index: Completion/Unix/Command/_pbm =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_pbm,v retrieving revision 1.1 diff -u -r1.1 _pbm --- Completion/Unix/Command/_pbm 2001/04/02 11:59:40 1.1 +++ Completion/Unix/Command/_pbm 2001/05/03 12:43:36 @@ -398,7 +398,7 @@ '-l-[specify left border width]:left border width:' \ '-r-[specify right border width]:right border width:' \ '-t-[specify top border width]:top border width:' \ - '-b-[specify bottom border width]:bottom border width:' \ + '-b-[specify bottom border width]:bottom border width:_guard "[0-9]#"' \ ':file: _pbm' ;; Index: Completion/Unix/Command/_w3m =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_w3m,v retrieving revision 1.1 diff -u -r1.1 _w3m --- Completion/Unix/Command/_w3m 2001/04/02 12:04:58 1.1 +++ Completion/Unix/Command/_w3m 2001/05/03 12:43:36 @@ -14,22 +14,22 @@ '-v[visual startup mode]' \ '-M[monochrome display]' \ '-F[automatically render frame]' \ - '-dump' \ + '(-dump_source -dump_head)-dump' \ '-cols:column width:' \ - '-dump_source' \ - '-dump_head' \ + '(-dump -dump_head)-dump_source' \ + '(-dump -dump_source)-dump_head' \ '+:goto line:' \ '-num[show line number]' \ '-no-proxy' \ '-no-mouse' \ - '-cookie' \ - '-no-cookie' \ + '(-no-cookie)-cookie' \ + '(-cookie)-no-cookie' \ '-no-graph' \ '-S[squeeze multiple blank lines]' \ '-W[toggle wrap search mode]' \ '-X[do not use termcap init/deinit]' \ '-o[option]:option-value:' \ - '-config:configfile:_files' \ + '-config:config file:_files' \ '-debug' \ ':url:->url' && return 0