سؤال

On an OSX system, ZSH shell and iterm2 terminal, I am running:

$history

Results are the 10 last commands.

How do I increase the default number of returned lines?

I can do

$history -20

And probably also alias this to history, but I do wonder if there is some setup to control this natively. Also, please do not confuse with HISTSIZE, which is a separated configuration.

هل كانت مفيدة؟

المحلول

There does not seem to be such configuration available.

Option is simply:

alias history="history -30"

نصائح أخرى

Just wrap the history command into a function:

h () { history ${1:-\-30} }

You get the last 30 history entries by default and still have the option to change the argument to another value.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top