Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: completion for loadkeys
- X-seq: zsh-workers 14216
- From: Oliver Kiddle <opk@xxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: completion for loadkeys
- Date: Thu, 03 May 2001 14:01:15 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010502120246.A27456@xxxxxxxx> <20010502162301.1343.qmail@xxxxxxxxxxxxxxxxxxxxxx> <20010502134550.A28606@xxxxxxxx>
- Sender: kiddleo
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author