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

Re: [bug] $scalar[(pws[\0])1] or $scalar[(pws[á])1] doesn't work



2022-11-13 08:14:52 +0000, Stephane Chazelas:
[...]
> $ a=$'foo\0bar'
> $ echo $a[(pws[\0])1]
> f
> 
> Expected "foo".
> 
> It seems that's some missing metafication as confirmed by:
[...]

It seems the problems are not limited to the s subscript flag.

$ ltrace -e getpwnam zsh -c "u=$'st\u00e9ph\u00e1ne';  echo *(u:\$u:)"
zsh->getpwnam("st\303\251ph\303\203\201ne")                                                       = 0
zsh:1: unknown username 'stépháne'
+++ exited (status 1) +++

See \241 changed to \203\201 in the call to getpwnam().

The error message has the correct name though.

-- 
Stephane




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