From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: _xwit
Date: 25 Mar 2000 03:38:55 +0900 [thread overview]
Message-ID: <rsq4s9w43i8.fsf@crane.jaist.ac.jp> (raw)
In-Reply-To: Tanaka Akira's message of "24 Mar 2000 22:33:30 +0900"
In article <rsq7les4hn9.fsf@crane.jaist.ac.jp>,
Tanaka Akira <akr@jaist.ac.jp> writes:
> Since I found that `xwit -keyrepeat 10 -<TAB>' runs _message, it is
> fixed as follows.
> - \( "/[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'" \| \) \) \# \
Oops. Since [0-9]## doesn't match empty string, `xwit -keyrepeat
<TAB>' didn't show the message. It should be [0-9]#.
Index: Completion/X/_xwit
===================================================================
RCS file: /projects/zsh/zsh/Completion/X/_xwit,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 _xwit
--- Completion/X/_xwit 2000/03/24 13:34:17 1.1.1.3
+++ Completion/X/_xwit 2000/03/24 18:33:43
@@ -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/" ":[[ -prefix [0-9]## ]] && _message keycode" \
- \( "/-$nul/" "/[0-9]##$nul/" ":[[ -prefix [0-9]## ]] && _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' \
\) \
But, this doesn't work because [[ -prefix [0-9]# ]] is failed even
when $PREFIX is empty:
Z(2):akr@is27e1u11% Src/zsh -f
is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% _tst () { if [[ -prefix [0-9]# ]]; then compadd succ; else compadd fail; fi }
is27e1u11% tst <TAB>
->
is27e1u11% tst fail
--
Tanaka Akira
next prev parent reply other threads:[~2000-03-24 18:39 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
2000-03-24 18:38 ` Tanaka Akira [this message]
-- 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=rsq4s9w43i8.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).