Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug / error in manpage.

Thanks much for taking a look into it and the prompt patch!

On 10/2/12 7:06 AM, "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> wrote:

>On Oct 1,  6:08pm, Larry Schrof wrote:
>} The man page for subscripting flags is incorrect. Here is the excerpt:
>}        The flags s, n and b take an argument; the delimiter is shown
>below  as
>}        `:',  but  any  character,  or  the  matching  pairs  `(...)',
>}        `[...]', or `<...>', may be used.
>} The '< >' brackets do not work as separators:
>} zsh% print $string[(ws<:>)2]
>} zsh: parse error near `)'
>} zsh%
>I see PWS has made a patch, but I just wanted to point out that the man
>page was NOT incorrect before.
>It works if you quote it:
>torch% print "$string[(ws<:>)2]"
>What PWS's patch does, in effect, is arrange that [ ] will quote the
>redirection operators so you no longer need to explicitly quote them in
>that particular context.  This is probably breaking some rule or other
>of POSIX shell syntax but I can't immediately come up with any example
>where it will matter.

Messages sorted by: Reverse Date, Date, Thread, Author