Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: A key to delete a history item would be nice



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