This is my ~/.zsh/.zshrc –
/home/shirish/.zsh> cat .zshrc
# Lines configured by zsh-newuser-install
HISTFILE=~/.zsh//.histfile
HISTSIZE=10000
SAVEHIST=100000
setopt inc_append_history autocd nomatch notify share_history
bindkey -e
# End of lines configured by zsh-newuser-install
# display how long all tasks over 10 seconds take
export REPORTTIME=10
# The following lines were added by compinstall
zstyle :compinstall filename '/home/shirish/.zsh//.zshrc'
autoload -Uz compinit promptinit
compinit
promptinit
# End of lines added by compinstall
#from https://unix.stackexchange.com/questions/332732/removing-strange-characters-from-a-zsh-prompt
export LC_ALL=en_IN.UTF-8
export LANG=en_IN.UTF-8
export LANGUAGE=en_IN.UTF-8
#from https://unix.stackexchange.com/questions/332888/how-to-have-a-longer-xterm-title-in-zsh
autoload -Uz add-zsh-hook
function xterm_title_precmd () {
print -Pn '\e]2;%n@%m %1~\a'
}
function xterm_title_preexec () {
print -Pn '\e]2;%n@%m %~ %# '
print -n "${(q)1}\a"
}
if [[ "$TERM" == (screen*|xterm*|rxvt*) ]]; then
add-zsh-hook -Uz precmd xterm_title_precmd
add-zsh-hook -Uz preexec xterm_title_preexec
fi
prompt bigfade
Now if I try to get history output I get only 16 entries in history from .zsh. What if I want to see all the entries. For some reason it saves/shows only 16, the rest either seem not to be recorded I do have multiple tabs of the same shell. I dunno if it's a bug or something more that I need to add.
Best Answer
From
man fc
:To solve your issue:
alias history='fc -l -100'