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

Re: [PATCH] [[:blank:]] only matches on SPC and TAB



On 15 May 2018 at 20:12, Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> Note that by some reading of the spec, and bash and yash have
> made such readings, when the spec says tokens are delimited by
> blanks, that's any blank in the locale.
>
> $ yash -c $'echo\u2006test'
> test
>
> In the case of bash, that only works "properly" with single-byte
> characters.

Doing some more or less bizarre coding, this allows to hide
information in the command line. Assuming script has access to full
command text (e.g. $jobtexts), it can check which argument is
prepended with e.g. non-breaking space(s), and which with regular
space(s). Zshell would behave as if there's no difference, while
script could decide on something, e.g. that nbs-prepended argument is
a fifo not a regular file, and some custom function show_jobs_status()
could show fifos in different color. Just doing deep-implications
survey, if e.g. SQL designers would do this properly, there wouldn't
be so many flavors of SQL today.

-- 
Best regards,
Sebastian Gniazdowski



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