If I perform a sequence of commands like:
$ ls
$ grep abc file.txt
and then use the up arrow key to get the previous one, the terminal will show the last cmd (which is the grep
here)
But if I do something like this:
$ ls
$ grep abc file.txt
where grep
is preceded by spaces, pressing up gives ls
, not grep
.
Why is this?