Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: moving to end of line
- X-seq: zsh-users 6411
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Skye Poier <skye@xxxxxxxxxx>
- Subject: Re: moving to end of line
- Date: Fri, 25 Jul 2003 16:43:12 -0500
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20030725211024.GG23355@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030725211024.GG23355@xxxxxxxxxx>
In the last episode (Jul 25), Skye Poier said:
> Hi everyone, I'm a recent tcsh convert, and loving it :) Got
> everything just the way I like it, except one minor niggling detail.
>
> When I scroll up and down through history with:
>
> bindkey "^[[A" history-beginning-search-backward
> bindkey "^[[B" history-beginning-search-forward
>
> It would be really nice to have the cursor moved to the END of the
> line, because 99% of the time I just need to change a bit of text on
> the end of the command. Is there a way to do that?
I'll leave this question to a widget wizard.
> I've "setopt ALWAYS_TO_END" but that's only for completion apparently.
>
> (by the way, it would be really nice to be able to specify termcap
> entries with bindkey)
I use this:
# Usage: bindtc <cap> <default> <zsh-command>
# If <cap> is unavailable, use <default>
bindtc ()
{
local keyval=$(echotc "$1" 2>&-)
[[ $keyval == "no" ]] && keyval=""
bindkey "${keyval:-$2}" "$3"
}
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author