Celeb Glow
news | March 17, 2026

Keyboard shortcut for ls command?

Is there a keyboard shortcut for the ls command besides the alias l? I mean something like: Ctrl l for clear command. One advantage, IMO, is that will not get in history list.

0

1 Answer

You can use bind to create a new keybinding, for example:

bind '"\C-g":"ls\n"'

Now press Control-g to invoke ls. However, lswill still be saved in history. You can add it toHISTIGNOREthough.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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