Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fw: Zsh - push current command on history without executing it
- X-seq: zsh-users 12407
- From: Paul Lew <paullew@xxxxxxxxx>
- To: zzapper <david@xxxxxxxxxx>
- Subject: Re: Fw: Zsh - push current command on history without executing it
- Date: Wed, 9 Jan 2008 11:15:44 -0800
- Authentication-results: sj-dkim-3; header.From=paullew@xxxxxxxxx; dkim=pass ( sig from cisco.com/sjdkim3002 verified; );
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; l=974; t=1199906150; x=1200770150; c=relaxed/simple; s=sjdkim3002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=paullew@xxxxxxxxx; z=From:=20Paul=20Lew=20<paullew@xxxxxxxxx> |Subject:=20Re=3A=20Fw=3A=20Zsh=20-=20push=20current=20comm and=20on=20history=20without=20executing=20it |Sender:=20; bh=VWfXqXiWfVuHOmwrIdMLA49IRxJfkWiYqOUvl7nnjHY=; b=Km69cps32XGCcI6lhoHE01jiNXgI6oFPdzMp6d52NJZP42+WiI5pBNSNJE 8MfMTmLX0NteiaWHHN4GXE+fC2VYJdYbqOfRg81E1CVY5fnXi7Af2vlzAyo4 cWc8aHhkxR;
- In-reply-to: <Xns9A20C0F173D23zzappergmailcom@xxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080104105900.37a87f7e@news01> <237967ef0801040304h494987bv939bf6ff9541123f@xxxxxxxxxxxxxx> <477E177A.3060303@xxxxxxxxxxxxx> <Xns9A20C0F173D23zzappergmailcom@xxxxxxxxxxxx>
>>>>> "zzapper" == zzapper <david@xxxxxxxxxx> writes:
zzapper> Casper Gripenberg wrote in news:477E177A.3060303@xxxxxxxxxxxxx:
>> Mikael Magnusson wrote:
>> > [...]
>>> And I have this custom widget to help me store a command line
>>> in history without executing it:
>>>
>>> commit-to-history() {
>>> print -s ${(z)BUFFER}
>>> zle send-break
>>> }
>>> zle -N commit-to-history
>>> bindkey "^X^H" commit-to-history
>>>
zzapper> Good one, BTW you can use this as a temporary memory for
zzapper> a telephone number etc etc as well etc.
zzapper> I seem to have trouble with double letter bindkeys , or
zzapper> is this the old vi- edit mode problem?
I use a pretty simple method, I just put echo in front of the string
I like to save and execute that line. Then it will be in the history.
I can search for these by back search the echo like:
echo<M-p>
Pretty easy.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author