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

Re: Certain unicode in hostname breaks with zsh 4.3.17



On Sun, 11 Mar 2012 20:56:38 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Mar 11, 10:28pm, Mikael Magnusson wrote:
> }
> } 0x308C0x306B0x306A% echo $HOST
> } zsh: no matches found: \M-c\M-^B|0x306B0x306A
> 
> Hm.
> 
>     hostnam = (char *)zalloc(256);
>     gethostname(hostnam, 256);
>     setsparam("HOST", ztrdup(hostnam));
>     zfree(hostnam, 256);
> 
> Apparently that ztrdup(hostnam) should be a metafy(hostnam, -1, META_DUP).
> 
> Should that get done with LOGNAME, MACHTYPE, OSTYPE, and VENDOR as well?

LOGNAME is imported, so in principle needs this treatment; the others
are from static defines so you might imagine they wouldn't.  Still, I
suppose it makes sense to be consistent when defining parameters
initially, the hit is tiny.

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog



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