Skip to content

Instantly share code, notes, and snippets.

@zhangchiqing
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhangchiqing/92029564386c5b1a87c8 to your computer and use it in GitHub Desktop.
Save zhangchiqing/92029564386c5b1a87c8 to your computer and use it in GitHub Desktop.
Shortcut for `ls -l`

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment