history 

Send to Kindle
home » snippets » zsh » history



Bag

# List the last 99 history items.
#   -i: prints full time-date stamps in ISO8601 ‘yyyy-mm-dd hh:mm’ format
#   -D: print elapsed time for that item
#   -l: print history to stdout
#   -99: start printing from this item – default is -16
#   -1:  stop printing at this item – default -1
fc -i -D -l -99 -1

ZLE related.

# Use wildcards in history search.
# See definitions at:
#     http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#History-Control
# For a more elaborate solution, see:
#     http://www.zsh.org/mla/users/2004/msg00681.html
bindkey '^Xr' history-incremental-pattern-search-backward
bindkey '^Xs' history-incremental-pattern-search-forward