Skip to content

Instantly share code, notes, and snippets.



Last active Sep 25, 2017
What would you like to do?
Key binding equivalents between Bash and Zsh
# bash
bind '"\el":"ls -lrtha --color=always\n"'
bind '"\ef":"find $PWD -type f -iname \"**\""'
bind '"\eg":"| xargs grep --delimiter \"\\n\" grep --color=always -ni \"*\""'
bind '"\e[1;3D": backward-word'
bind '"\e[1;3C": forward-word'
bind '"\e[1;3A": history-search-backward'
bind '"\e[1;3B": history-search-forward'
bind '"\ep":"pwd\n"'
bind '"\e4"':yank-last-arg
bind '"\ek"':kill-line
# zsh
bindkey -s "^[l" 'ls -lr --time=ctime --ignore-backups --color=always --classify --almost-all --reverse --human-readable --group-directories-first --ignore=".fuse*" --ignore="._*" | tac\n'
bindkey -s "^[f" 'find $PWD -type f -iname "**"^[[D^[[D'
bindkey -s "^[g" '^[[F | xargs --delimiter "\\n" grep --color=always -ni ""^[[D'
bindkey "^[[1;3D" backward-word
bindkey "^[[1;3C" forward-word
bindkey "^[[1;3A" history-beginning-search-backward
bindkey "^[[1;3B" history-beginning-search-forward
bindkey "^[4" insert-last-word
bindkey "^[k" vi-kill-eol
# Other notes:
# (-) If using iTerm (Mac OS X) some keyboard settings are necessary:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment