In a scenario like following:

sudo apt install a

(press Tab twice)

Display all 1244 possibilities? (y or n)

(press Y)

(It shows me a list where I can keep seeing more by pressing Enter)


Every Enter keypress shows one more line. And if I held down Enter key, at some point it would reach to the end of the list and execute sudo apt install a by mistake.

It is harmless in this scenario but it could have executed something bad if I was cycling through a list of directories while doing some rm -rf foo

Is there a more efficient and safe way of scrolling through autocomplete recommendations output list?


I never use Enter to move forward in such a case. Enter moves only one line up and that is inefficient, and a waste of time for me.

Use Space which moves a whole screen ahead and there is no danger of executing unwanted command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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