zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@u.genie.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: completion for loadkeys
Date: Thu, 03 May 2001 14:01:15 +0100	[thread overview]
Message-ID: <3AF1569B.300A92F@u.genie.co.uk> (raw)
In-Reply-To: <20010502134550.A28606@dman.com>

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


      reply	other threads:[~2001-05-03 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-02 15:00 Clint Adams
2001-05-02 15:52 ` Oliver Kiddle
2001-05-02 16:02   ` Clint Adams
2001-05-02 16:23     ` Oliver Kiddle
2001-05-02 17:45       ` Clint Adams
2001-05-03 13:01         ` Oliver Kiddle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3AF1569B.300A92F@u.genie.co.uk \
    --to=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).