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

Re: Another idea on how to insert illegal multibyte characters

Wayne Davison wrote:
> Here's another idea on how filenames with illegal byte sequences could
> be inserted in the command line:  insert a $'\321' string for each one.

That ought to work quite well, although to do it completely consistently
you'd have to worry about quoting, which is difficult at that point
inside zle.  Filenames aren't usually quoted, except using backslashes,
so this will work most of the time, but every now and then it won't.
I certainly think it's good enough for now.

The completion system is a bit more quoting aware: it knows whether or
not it needs to insert a backslash before special characters because of
quotes earlier on the line.  Ideally it should handle unprintable
characters at the same point where it tries to do that.  That doesn't
need to be done at the same time, though.  (I would hope it could be
done independently and prevent the equivalent code inside zle kicking

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

Your mail client is unable to display the latest news from CSR. To access our news copy this link into a web browser:  http://www.csr.com/email_sig.html

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