18 Sep 04:59
using history in a command processor
From: Rocky Bernstein <rocky.bernstein <at> gmail.com>
Subject: using history in a command processor
Newsgroups: gmane.comp.shells.zsh.devel
Date: 2008-09-18 02:59:44 GMT
Expires: This article expires on 2008-10-02
Subject: using history in a command processor
Newsgroups: gmane.comp.shells.zsh.devel
Date: 2008-09-18 02:59:44 GMT
Expires: This article expires on 2008-10-02
I'm writing basically a command processor and want to use the zsh history mechanism for that. I see that using fc I can read a history file and write it, but how do I put those commands in the history that I want? Right now I'm using vared when in an interactive terminal and read when not. But after reading I do a check on the command. The input might get changed a little and that's what I want to push onto the history.
Also, is there a way to delete an entry?
In other words, what I'm looking for is an equivalent to what in bash is "history -s"
Thanks.
Also, is there a way to delete an entry?
In other words, what I'm looking for is an equivalent to what in bash is "history -s"
Thanks.
RSS Feed