For example, one of my bash aliases is this
alias p='clear;ls -lt;pwd;'
clear also clears the history which I don't want. I just want to clear the screen momentarily.
Ctrl+L however does exactly what I want. How can I use it in my alias?
Another way to clear the terminal is to use
What you've asked for in general is called executing a readline command from bash (the equivalent of
However, in this specific case, I don't observe any difference between running