como mostrar mais entradas do que o padrão 16 em zsh?

0

Este é o meu ~ / .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

Agora, se eu tentar obter a saída do histórico, receberei apenas 16 entradas no histórico de .zsh. E se eu quiser ver todas as entradas. Por alguma razão, ele salva / mostra apenas 16, o resto parece não ser gravado Eu tenho várias abas do mesmo shell. Eu não sei se é um bug ou algo mais que eu preciso adicionar.

    
por shirish 14.01.2018 / 19:58

1 resposta

0

De man fc :

If first and last are both omitted, the previous 16 commands shall be listed or the previous single command shall be edited (based on the −l option).

Para resolver seu problema: alias history='fc -l -100'

    
por 15.01.2018 / 04:08