Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: New options & arguments processing system for ZSH
- X-seq: zsh-workers 15673
- From: martin.ebourne@xxxxxxxxxxxx
- To: Felix Rosencrantz <f_rosencrantz@xxxxxxxxx>
- Subject: Re: New options & arguments processing system for ZSH
- Date: Tue, 21 Aug 2001 15:07:33 +0100
- Cc: zsh-workers@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
> prompt% yes2 -<TAB>
> ---- 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author