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

history related suggestions



I've finally got around to trying out Wayne's recent history extensions (see
msgs 6218, 6236 and 6255) and have a few suggestions.

I'm not convinced by the zle set-local-history system for toggling between
local and shared history. I (and I would think most people) will bind one
set of keys to shared history operations and another set to local ones
rather than binding a key to toggle the history mode. With argument handling
hopefully being added to zle widgets (which I think is a great idea), I
think it would be better to ditch set-local-history and add an option to
each of the history related widgets specifying whether to use shared or
local history. Along with this, I would suggest that parameter expansion be
done on the zle widget arguments each time the widget is run. This would
allow users to do:
bindkey '^[[A' up-line-or-history '$history_toggle'
and then change the $history_toggle variable to select between local and
shared history.

My second suggestion is that the history items imported when zsh first runs
(if SAVEHIST is set) should be marked as foreign.

What I would also like is if these were numbered so that the most recent one
is the same as $HISTSIZE. This would mean that when I first run zsh, the
first command I type would be number 1, not 200. I'm more likely to recall
it than one in my saved history and !1 is less typing than !200. Ideally,
what would be nice is if the numbers of commands between two versions of zsh
running at the same time would correspond but I imagine that it wouldn't be
easy to implement and would cause a few problems.

Oliver Kiddle



Messages sorted by: Reverse Date, Date, Thread, Author