5

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.

5

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

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

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

| improve this answer | |

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.