Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In ZSH when I type history I'm only displayed the last 16 or so commands. I would like history to display all the existing commands in the history file.

When I look in my .zsh_history (my history file) I see all the 500 previous commands that should be there.

I looked in the man page, but I don't see anything that controls how many of the history items are listed. I also looked in my, env but don't see anything that could be controlling this.

Any help would be appreciated! thanks.

share|improve this question

1 Answer 1

up vote 15 down vote accepted

history 1 (or history 1 -1) will display all entries from 1 (first entry) to -1 (last entry). You can also use history 1 100 to display the first 100 entries or history -100 -1 to display the last 100 etc.

For more information see the section on fc in man zshbuiltins. (history is equivalent to fc -l).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.