For zsh user, a useful shortcut for ls
is alt + l
. If you prefer using ls -l
, you can find the configuration at ~/.oh-my-zsh/lib/key-bindings.zsh
With the following config, you can list your files and clear the screen by alt + l
and alt + c
without pressing Enter
key!
bindkey -s '\el' 'ls -l\n' # [Esc-l] - run command: ls
bindkey -s '\ec' 'clear\n' # [Esc-c] - run command: clear