From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20867 invoked from network); 16 May 2000 17:23:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 May 2000 17:23:41 -0000 Received: (qmail 20584 invoked by alias); 16 May 2000 17:23:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11418 Received: (qmail 20576 invoked from network); 16 May 2000 17:23:34 -0000 From: "Bart Schaefer" Message-Id: <1000516172311.ZM6901@candle.brasslantern.com> Date: Tue, 16 May 2000 17:23:11 +0000 In-Reply-To: <20000516060435.682.qmail@web1303.mail.yahoo.com> Comments: In reply to Felix Rosencrantz "PATCH: Completion matching control test. (Try 2)" (May 15, 11:04pm) References: <20000516060435.682.qmail@web1303.mail.yahoo.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Felix Rosencrantz , zsh-workers Subject: Re: PATCH: Completion matching control test. (Try 2) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 15, 11:04pm, Felix Rosencrantz wrote: } Subject: PATCH: Completion matching control test. (Try 2) } } I would really like to say } print -lr "COMPADD:{${match[6]//[\r\n]/}}" } } But we can't use the backslash escape sequences here. This works for me: print -lr "COMPADD:{${match[6]//[$'\r\n']/}}" Normally $'...' isn't expanded inside double quotes, but because it's inside an embedded ${...} expansion, the rules get bent. (I hope that's not a bug.) } I'd like to see this added even though the test fails. The failure included below looks like a bug in the matcher code, because the L spec should cause the string on the line to be retained. Several more tests fail for the same reason (I commented out the cleanup/exit in ZTST_testfailed to force it to run them all). I suspect the other failed tests are confusion over `*' vs. `**' in the matcher patterns, but I'm not sure. For example, the test Documentation example using "r:|[A-Z0-9]=* r:|=*", input H works if I change the * to **, and the "input 2" test after it also gives the right output with ** but fails based on the ending cursor position. (Does that mean the examples in the doc are out of date? I haven't looked yet.) *** /tmp/zsh.ztst.out.26952 Tue May 16 09:36:58 2000 --- /tmp/zsh.ztst.tout.26952 Tue May 16 09:37:00 2000 *************** *** 1,2 **** ! line: {tst nolistbeep }{} COMPADD:{} --- 1,2 ---- ! line: {tst listbeep }{} COMPADD:{} Test ../../zsh-3.1.6/Test/54compmatch.ztst failed: output differs from expected as shown above for: example1_list=( kshoptionprint shglob listambiguous shinstdin listbeep shnullcmd listpacked shoptionletters listrowsfirst shortloops listtypes shwordsplit ) options_matcher='L:|[nN][oO]= M:_= M:{A-Z}={a-z}' test_code $options_matcher example1_list comptest -c "$code" $'tst nolistbee\t' Was testing: Documentation example for options, input "nolistbee" ../../zsh-3.1.6/Test/54compmatch.ztst: test failed. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com