Last active
April 19, 2024 04:10
-
-
Save gregorynicholas/1812027 to your computer and use it in GitHub Desktop.
OSX .inputrc to make terminal way better. and by better i mean i'm naked
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
"\e[5~": history-search-backward | |
"\e[6~": history-search-forward | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word | |
set completion-ignore-case On | |
set expand-tilde on | |
set convert-meta off | |
set input-meta on | |
set output-meta on | |
set show-all-if-ambiguous on | |
set visible-stats on | |
set -o vi |
@gregorynicholas, this didn't seem to matter but 4 of the double quotes in your example are not actually " characters.
@rampion it's escape-home
If "\e[1~"
is escape home, what are the others?
Lines 3 and 4 have smart quotes.
@colemickens thnx
Most important lines in my .inputrc:
# From http://www.ukuug.org/events/linux2003/papers/bash_tips/
# Incremental searching with Up and Down. Type 'ssh <up>' to get the last 'ssh' command you used
"\e[A": history-search-backward
"\e[B": history-search-forward
Reloading these combinations with source ~/.inputrc
didn't work for me and this worked: bind -f ~/.inputrc
Thank you @shoshial: that solved my problems.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Backward word delete didn't work for me until I checked this setting:
Terminal
|Preferences
|Settings
|Keyboard
|Use option as meta key
And forward word delete only works once I add a key mapping in the same
Keyboard
panel with the following settingsNow all is right in the universe.