sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
13.98k stars 4.49k forks source link

history command only shows the last item #2052

Open ngocphamm opened 1 year ago

ngocphamm commented 1 year ago

Description

As title, after updating to latest version for the history module (using zinit, executing history command only shows the last command I had in my history.

It was working fine before this commit https://github.com/sorin-ionescu/prezto/commit/e14fdff4cbce3fb70dd641d2234465a5dae44561.

I found out that it works again if I have zstyle ':prezto:module:history' histsize <number> set.

Expected behavior

history command shows more commands in my history. I'm not even sure what's the default number is but here I get 16 commands.

Actual behavior

history command only shows the last command in my history.

Steps to Reproduce

  1. Start a new zsh session
  2. Execute some commands
  3. Exit the session (so the commands are being saved to the history file)
  4. Start a new zsh session
  5. Execute history command
  6. See only the last command is displayed

Versions