From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16544 invoked from network); 24 Mar 2000 18:39:27 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Mar 2000 18:39:27 -0000 Received: (qmail 13091 invoked by alias); 24 Mar 2000 18:39:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10236 Received: (qmail 13077 invoked from network); 24 Mar 2000 18:39:18 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: _xwit References: <200003241254.NAA26008@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 25 Mar 2000 03:38:55 +0900 In-Reply-To: Tanaka Akira's message of "24 Mar 2000 22:33:30 +0900" Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) In article , Tanaka Akira writes: > Since I found that `xwit -keyrepeat 10 -' 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 ' 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 -> is27e1u11% tst fail -- Tanaka Akira