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

Re: How to give command line??



Edgar Merino wrote:
> Hello, now that I saw this I've got a question kind of related to this: 
> can I apply color dinamically to some part of the cmd line based on the 
> current string typed?
> For example, given this cmd line string "user@host ~/>% ssh 
> remote@xxxxxxxxxxxxxx", is it possible to apply a, say, red color to the 
> substring "ssh" dinamically (after it's been typed)?

Sort of, but currently (4.3.10) not very usefully.  The zshzle manual
gives a description of region_highlight that allows certain tricks of
this sort, but at the moment you have to do a lot of work yourself with
shell widgets to apply it.  Also, highlighting doesn't move dynamically
when the text is edited.  Until someone has much more time to spend on
this it's mostly useful for static effects (for example, as in the
read-from-minibuffer widget).

-- 
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



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