0

When typing commands in the Cygwin Terminal, if I enter the same command twice, it will be stored twice when I press the up arrow.

For example, if I enter command1 once and command2 twice, I have to press the up arrow twice to get back to command1. I want to configure it so that I only have to press up twice to get back to command1. Is this possible with the Cygwin Terminal?

4

1 回答 1

1

I assume that you're talking about bash, the shell running the cygwin command line.

As explained here

export HISTCONTROL=ignoredups

will achieve the effect you want. Persisting this setting can be done via .bashrc

于 2013-01-09T01:38:13.797 回答