Zsh Mailing List Archive
Messages sorted by:
Re: using history in a command processor
- X-seq: zsh-users 13242
- From: "Rocky Bernstein" <rocky.bernstein@xxxxxxxxx>
- To: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: using history in a command processor
- Date: Thu, 18 Sep 2008 11:49:02 -0400
- Cc: "zsh users mailing list" <zsh-users@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=u8G5tLsYcIfiSOvXuCeNMpppViUWl3gaT5Hzzw2KY9w=; b=R9vu3o+9lzRlJoiMj4F7ri4S3QP8MV1Jpx1neTNMzz5WiJmmh38CYd2yfqbArZEhZx mxmMcR4IYQ1P8zccaNE2uhKT5f0GpmioMwqxWziKQnAXHTIm6/nmywxk+OuHRv76BNrI D+Dmhnk+EavrDGm2vp+S+AcCpeEB1noG1pmiE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=COVp2WAxYD9VxugaisQ8IG35w8GZEE21Ao8R0HNh1LvZoafRcY7ZCyDoHxLeuvHu6G inYj1GccnbWKQVQoMWMoRhSI7iRm9ZZaNHq2nc7jZZIQitq1QI11VzMUZCLztA3Yw70V Te+7/rgl1hhZ23/iQG2J/i1mn4QYV+VUfgIbk=
- In-reply-to: <080917215709.ZM27637@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <6cd6de210809171959pf390cafr7858b7769ccfde85@xxxxxxxxxxxxxx> <080917215709.ZM27637@xxxxxxxxxxxxxxxxxxxxxx>
On Thu, Sep 18, 2008 at 12:57 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
On Sep 17, 10:59pm, Rocky Bernstein wrote:You want "print -s".
} In other words, what I'm looking for is an equivalent to what in bash is
} "history -s"
Got it. thanks. The organization of the functions to do editing and history seems a bit weird.
I think of print and read going together but the kind of read you need for editing is vared
not read. Bash is a little more logical here in that there is a -e option on read. Of course it doesn't have all the other options for specifying keymaps and so on, but largely that's not needed.
So once you find out not to use read but vared, I find myself in the zle section where of course there is nothing about print -s. And history manipulation seems to be fc which brings us back to builtins which also doesn't mention that there is this print -s thing.
Perhaps there should be a fc thing that is equivalent to "print -s"?
And the name history seems to be better than fc, so it's good there is that builtin. But perhaps it should allow the other options that fc allows. In other words be an alias to "fc" rather than "fc -l".
Functions/Misc/sticky-note has an example of this.
So does Functions/Misc/zcalc, which effectively IS a command processor.
Only by having them fall off due to HISTSIZE or be skipped by one of the
} Also, is there a way to delete an entry?
Messages sorted by: