* PATCH: completion for loadkeys
@ 2001-05-02 15:00 Clint Adams
2001-05-02 15:52 ` Oliver Kiddle
0 siblings, 1 reply; 6+ messages in thread
From: Clint Adams @ 2001-05-02 15:00 UTC (permalink / raw)
To: zsh-workers
Index: Completion/Unix/Command/_loadkeys
===================================================================
RCS file: _loadkeys
diff -N _loadkeys
--- /dev/null Mon Dec 11 17:26:27 2000
+++ _loadkeys Wed May 2 07:59:10 2001
@@ -0,0 +1,16 @@
+#compdef loadkeys
+
+_arguments \
+ '(--clearcompose)-c[clearcompose]' \
+ '(-c)--clearcompose' \
+ '(--default)-d[default]' \
+ '(-d)--default' \
+ '(--help)-h[help]' \
+ '(-h)--help' \
+ '(--mktable)-m[mktable]' \
+ '(-m)--mktable' \
+ '(--clearstrings)-s[clearstrings]' \
+ '(-s)--clearstrings' \
+ '(--verbose)-v[verbose]' \
+ '(-v)--verbose' \
+ ':keymap:_files -W /usr/share/keymaps'
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: completion for loadkeys
2001-05-02 15:00 PATCH: completion for loadkeys Clint Adams
@ 2001-05-02 15:52 ` Oliver Kiddle
2001-05-02 16:02 ` Clint Adams
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Kiddle @ 2001-05-02 15:52 UTC (permalink / raw)
To: zsh-workers
--- Clint Adams <clint@zsh.org> wrote:
Completion/Unix/Command/_loadkeys
> + ':keymap:_files -W /usr/share/keymaps'
Could we maybe have the usual _is_gnu tests in this? I've only got
access to Solaris today and there, loadkeys takes only one parameter -
a file name - so default completion would be best. /usr/share/keymaps
doesn't even exist on Solaris.
If you want, leave it to me and I'll do the change but it may be a few
days before I get a chance to.
Oliver
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: completion for loadkeys
2001-05-02 15:52 ` Oliver Kiddle
@ 2001-05-02 16:02 ` Clint Adams
2001-05-02 16:23 ` Oliver Kiddle
0 siblings, 1 reply; 6+ messages in thread
From: Clint Adams @ 2001-05-02 16:02 UTC (permalink / raw)
To: Oliver Kiddle; +Cc: zsh-workers
> > + ':keymap:_files -W /usr/share/keymaps'
>
> Could we maybe have the usual _is_gnu tests in this? I've only got
> access to Solaris today and there, loadkeys takes only one parameter -
> a file name - so default completion would be best. /usr/share/keymaps
> doesn't even exist on Solaris.
> If you want, leave it to me and I'll do the change but it may be a few
> days before I get a chance to.
How's this?
Index: Completion/Unix/Command/_loadkeys
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_loadkeys,v
retrieving revision 1.1
diff -u -r1.1 _loadkeys
--- Completion/Unix/Command/_loadkeys 2001/05/02 15:02:35 1.1
+++ Completion/Unix/Command/_loadkeys 2001/05/02 16:01:50
@@ -1,5 +1,8 @@
#compdef loadkeys
+if [[ $OSTYPE == linux* ]]
+then
+
_arguments \
'(--clearcompose)-c[clearcompose]' \
'(-c)--clearcompose' \
@@ -14,3 +17,10 @@
'(--verbose)-v[verbose]' \
'(-v)--verbose' \
':keymap:_files -W /usr/share/keymaps'
+
+elif [[ $OSTYPE == solaris* ]]
+then
+
+ _files -W /usr/share/lib/keytables
+
+fi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: completion for loadkeys
2001-05-02 16:02 ` Clint Adams
@ 2001-05-02 16:23 ` Oliver Kiddle
2001-05-02 17:45 ` Clint Adams
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Kiddle @ 2001-05-02 16:23 UTC (permalink / raw)
To: Clint Adams; +Cc: zsh-workers
--- Clint Adams <clint@zsh.org> wrote:
> How's this?
> + _files -W /usr/share/lib/keytables
It could do with an else part of the if statement which does normal
completion but other than that fine.
I couldn't say for sure for Solaris because I'm not particularly
familiar with loadkeys. I guess that it is only relevant on the console
because it has no effect in my terminal window. Does Solaris definitely
take the filename as relative to /usr/share/lib/keytables as opposed to
the current directory - i.e will `loadkeys uk' work or do you need
`loadkeys /usr/share/lib/keytables/uk'? The man page isn't clear and
whatever parameter I give loadkeys, it prints absolutely nothing and
returns 1 so I don't know.
Oliver
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: completion for loadkeys
2001-05-02 16:23 ` Oliver Kiddle
@ 2001-05-02 17:45 ` Clint Adams
2001-05-03 13:01 ` Oliver Kiddle
0 siblings, 1 reply; 6+ messages in thread
From: Clint Adams @ 2001-05-02 17:45 UTC (permalink / raw)
To: Oliver Kiddle; +Cc: zsh-workers
> I couldn't say for sure for Solaris because I'm not particularly
> familiar with loadkeys. I guess that it is only relevant on the console
> because it has no effect in my terminal window. Does Solaris definitely
> take the filename as relative to /usr/share/lib/keytables as opposed to
> the current directory - i.e will `loadkeys uk' work or do you need
> `loadkeys /usr/share/lib/keytables/uk'? The man page isn't clear and
> whatever parameter I give loadkeys, it prints absolutely nothing and
> returns 1 so I don't know.
It does. If you tell it to load something that doesn't exist in
/usr/share/lib/keytables, it gets upset.
This is with Solaris 8, BTW. I don't have earlier versions to
play with at the moment.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: completion for loadkeys
2001-05-02 17:45 ` Clint Adams
@ 2001-05-03 13:01 ` Oliver Kiddle
0 siblings, 0 replies; 6+ messages in thread
From: Oliver Kiddle @ 2001-05-03 13:01 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-05-03 13:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-02 15:00 PATCH: completion for loadkeys 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
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).