From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27872 invoked from network); 21 Aug 2001 14:10:32 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Aug 2001 14:10:31 -0000 Received: (qmail 16513 invoked by alias); 21 Aug 2001 14:10:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15673 Received: (qmail 16498 invoked from network); 21 Aug 2001 14:10:23 -0000 From: martin.ebourne@arcordia.com Subject: Re: New options & arguments processing system for ZSH To: Felix Rosencrantz Cc: zsh-workers@sunsite.auc.dk Date: Tue, 21 Aug 2001 15:07:33 +0100 Message-ID: X-MIMETrack: Serialize by Router on LON-ARCMTA-01/ARCORDIA(Release 5.0.3 (Intl)|21 March 2000) at 08/21/2001 03:07:35 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii > prompt% yes2 - > ---- option > --escape -e -- __Interpret escape characters as for echo (default unless > --help -h -- __Provide help > --lines -l -- __Output only count times > --no-escape -E -- __Prevent interpretation of escape characters > --no-newline -n -- __Suppress output of automatic newline > --sleep -s -- __Pause for number of seconds between each echo > > The way I read your mail, though, is that the yes2 output should be coming > from the original "yes" script. So there might be a problem somewhere, > or I just didn't understand you. Aha! Yes, it should do exactly that. I think I know what the problem is as well. parse_opts detects the difference between the options and the help text because the latter follows tab characters, and the former is before any tab characters. The documentation is correct about this, but I wouldn't expect you to have read all that anyway. However, I should say that the ever wonderful Lotus *#?! Notes program here has carefully converted my tabs to spaces and totally stuffed it up. So if you could put 'yes' into emacs and M-x tabify with the whole thing selected, or something else similar, it should start working properly. Sorry about that - just more ammo for my personal vendetta against the worst email program in the universe. > If you use a state action, _arguments puts information in the opt_args > associative array. I think it could be useful if there was a little > more control how parsed values are stored like provided by parse_opts. Ah, ok. I haven't used the state machine facilities yet, but I can see how that might be handy. Cheers, Martin.