From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: _xwit
Date: 24 Mar 2000 22:33:30 +0900 [thread overview]
Message-ID: <rsq7les4hn9.fsf@crane.jaist.ac.jp> (raw)
In-Reply-To: Sven Wischnowsky's message of "Fri, 24 Mar 2000 13:54:30 +0100 (MET)"
In article <200003241254.NAA26008@beta.informatik.hu-berlin.de>,
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
> Hm. If I parsed _xwit correctly (which I'm not sure about, because I
> haven't really understood _regex_arguments yet):
>
> _arguments '-keyrepeat:*[0-9]##:keycode: ' ...
>
> What have I missed?
-keyrepeat and -nokeyrepeat takes a sequence of words. The words is
sequence of:
1) a keycode represended as an integer (one word)
2) a keycode range represented as an integer, hyphen and an integer
(three words)
For example,
xwit -nokeyrepeat 61 - 69 128
disables autorepeat for keys `q', `w', `e', `r', `t', `y' and ` '.
(On my keyboard, of course.)
The arguments for -keyrepeats is end before next option as:
xwit -nokeyrepeat 61 - 69 128 -sync
So, '-keyrepeat:*[0-9]##:keycode: ' doesn't work because [0-9]##
matches to the first argument: `61'.
If _arguments have a form like `:*pattern:message:action' but the
pattern is matched against to a argument *next* to an arguments for
the option, we can use _arguments for _xwit.
> If the tag alias changes make it in, this would become what is shown
> in the patch below.
Wow. Thanks.
> The patch also shows one of the way to do this with tag aliases. Unless
> we find a way to put that into _regex_arguments, that is. We would
> need the descriptions and tags there then but it doesn't handle them,
> right? Sigh.
Hm. I'll read changed tag stuff...
Since I found that `xwit -keyrepeat 10 -<TAB>' runs _message, it is
fixed as follows.
Index: Completion/X/_xwit
===================================================================
RCS file: /projects/zsh/zsh/Completion/X/_xwit,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 _xwit
--- Completion/X/_xwit 2000/03/24 12:56:54 1.1.1.2
+++ Completion/X/_xwit 2000/03/24 13:29:35
@@ -39,8 +39,8 @@
\| "/iconmove$nul/" "$guard" "/$word/" ":_message x" "/$word/" ":_message y" \
\| "/id$nul/" "$guard" "/$word/" ":_x_window" \
\| "/(no|)keyrepeat$nul/" "$guard" \
- \( "/[0-9]##$nul/" ":_message keycode" \
- \( "/-$nul/" "/[0-9]##$nul/" ":_message 'last keycode'" \| \) \) \# \
+ \( "/[0-9]##$nul/" ":[[ -prefix [0-9]## ]] && _message keycode" \
+ \( "/-$nul/" "/[0-9]##$nul/" ":[[ -prefix [0-9]## ]] && _message 'last keycode'" \| \) \) \# \
\| "/names$nul/" "$guard" "/$word/" ":_x_window -n" \# \
\| "/[]/" ':_xwit_compopts' \
\) \
--
Tanaka Akira
next prev parent reply other threads:[~2000-03-24 13:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-24 12:54 Sven Wischnowsky
2000-03-24 13:33 ` Tanaka Akira [this message]
2000-03-24 18:38 ` Tanaka Akira
-- strict thread matches above, loose matches on Subject: below --
2000-03-27 11:00 Sven Wischnowsky
2000-03-24 11:26 Tanaka Akira
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=rsq7les4hn9.fsf@crane.jaist.ac.jp \
--to=akr@jaist.ac.jp \
--cc=zsh-workers@sunsite.auc.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).