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

Re: How to make underlining of a command line disappear after an ordinary key press? (2)



2009/10/10 Guido van Steen <gvsteen@xxxxxxxxx>:
> Well, it seems that binding a widget like:
>
> """ordinary-key-press(){
> ÂÂÂ region_highlight=("0 0 underline")
> ÂÂÂ zle .self-insert;
> }
> """
>
> to all ordinary keys by:
>
> """zle -N ordinary-key-press
> bindkey 'a' ordinary-key-press
> ...
> ...
> ...
> bindkey 'Z' ordinary-key-press
> bindkey '^[[C' ordinary-key-press # arrow right
> bindkey '^[[D' ordinary-key-press # arrow left
> ...
> ...
> """
>
> achieves what I had in mind.
>
> I am still wondering though if the underlining can't be
> turned be done from within the widget
> "underline_cmdline_partially".
>
> Or can it at least be done without so many bindkey commands?

I think you can just do zle -N self-insert ordinary-key-press

-- 
Mikael Magnusson



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