Skip to content

Instantly share code, notes, and snippets.

@RobRuana
Last active January 19, 2020 17:46
Show Gist options
  • Save RobRuana/d701430f9d77d1ea00f9 to your computer and use it in GitHub Desktop.
Save RobRuana/d701430f9d77d1ea00f9 to your computer and use it in GitHub Desktop.
Configure readline to make Mac OS X Terminal more usable
#--------------------------------------------------------
# Configure readline to make terminal more usable
#--------------------------------------------------------
# Wrap lines longer than the terminal
set horizontal-scroll-mode Off
# Enable 8bit input
set meta-flag On
set input-meta On
# Turns off 8th bit stripping
set convert-meta Off
# Keep the 8th bit for display
set output-meta On
# Tab completion options
set completion-ignore-case On
set show-all-if-ambiguous On
set visible-stats On
# delete key
"\e[3~": delete-char
# alt+left/right arrow keys
"\e\e[D": backward-word
"\e\e[C": forward-word
# cmd+left/right arrow keys
# "\e[D": beginning-of-line
# "\e[C": end-of-line
# ctrl+left/right arrow keys
"\e[1;5D": backward-word
"\e[1;5C": forward-word
# shift+left/right arrow keys
"\e[1;2D": beginning-of-line
"\e[1;2C": end-of-line
# alt+up/down arrow keys
"\e[5~": beginning-of-history
"\e[6~": end-of-history
# up/down arrow keys
"\e[B": history-search-forward
"\e[A": history-search-backward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment