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)
- X-seq: zsh-users 14476
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Guido van Steen <gvsteen@xxxxxxxxx>
- Subject: Re: How to make underlining of a command line disappear after an ordinary key press? (2)
- Date: Sat, 10 Oct 2009 23:40:49 +0200
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HKYWqef8JlRaXXUDo0BpLYgfFQBdMTes+BEpKong9CA=; b=QJAH1ngVe7+3zjAsWKgtZ6PLs+6LzvEI1Nmpn0GfP9NKECErJiByjWI71ETMBdfU7Z EFSxCpBhqYk2SsCqF160yGaJVBYx7eHmHDkO9jjfxW5PGm/xRwom6X10G4nLDSNc2Hyf d6+d2wcvmhA7Pkt1y4yyy4U7G+8/bc/67RTOc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=pa9wgNuO8PDGMNvruwRd2GR8bWdRSQBKJzMuTdyG7pINl/2SMB2PHcNANI9jK6tRex eK1Bc0AmSs0GPKFzZYT5DPXe+gbDNS3egrRkfw5PYfNWv7nKoHCYgSyd8gVvgTE5dCm7 7hnX4A81enT5STxmLuPu/G79mgiHmQb40BfOg=
- In-reply-to: <487293.58954.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <487293.58954.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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