Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A key to delete a history item would be nice
- X-seq: zsh-workers 30938
- From: Ivan Sichmann Freitas <ivansichfreitas@xxxxxxxxx>
- To: Dave Yost <Dave@xxxxxxxx>
- Subject: Re: A key to delete a history item would be nice
- Date: Thu, 3 Jan 2013 21:17:02 -0200
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=9E4DbLRous3+x9pZiq5ZbTf1jFP8WA87Uuq0RnIKjTY=; b=cHB0JRLbpOn/XkcNZ2jDlQ8rX1giamqckHRa219T7kh7x5KCMO+HZWGcpkj590cRzZ GYYNjuRIOTWyaphWh7WMBjtKgqNjDBM5sN0aEh78itfHHtSvJSJaJl3K19oTLflecZjq a7P/j0cX4eymNBDpkQCuu+7l860+iINsvPjyZlrOYldOPds5X0MHn9GFbMHjNeHgVfBe x12hIO4wnKb+40w03adPBCBRoLcYBNV+m5H82drNsxtZPu9hf//8Uj25NDcHnQ0jzhtC Em9h2qNqQhRjmyYTEXpNMMDQhbePRjD9lRkeNz4YFUEW4aPWmlkXmHq0KkaXcZ7XNN67 VjZw==
- In-reply-to: <F2DC99E6-8445-4B1D-8E3E-AA2F8A09845B@Yost.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <F2DC99E6-8445-4B1D-8E3E-AA2F8A09845B@Yost.com>
On Sat, Dec 29, 2012 at 01:22:02PM -0800, Dave Yost did gyre and gimble:
I’m using up-arrow to look back in history. Some of those history items
are useless because they are mistakes.
I would recommend using history-incremental-search-backward and
history-incremental-pattern-search-backward (the former has the default
binding of Control+r in emacs mode) even if you manage to delete items
from your history. They are much faster and enable you to search history
based in words or patterns.
It would be nice if there were a keystroke that would delete the current history item.
AFAIK there's no default zle widget to delete a item from the history,
but I think you can achieve it by creating a custom zle widget (se
zshzle(1) manpage). However, there are ways to control what is recorded
in history, see options HIST_IGNORE_DUPS, HIST_IGNORE_SPACE and others
at zshoptions(1).
--
Ivan Sichmann Freitas
GNU/Linux user #509059
SDF Arpa Member http://isf.sdf.org/about.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author