In bash one can do the following:
bind -x '"\C-l":ls'
to map Ctrl+L to external (ie. system's rather than readline function)
ls
command to list directory contents.
How to do the same in zsh, and preferably with Alt (\M-l
?)
instead of Ctrl as it is seemingly already bound to clear
to clear the screen.