1# My ~/.inputrc file is in -*- text -*- for easy editing with Emacs. 2# 3# Notice the various bindings which are conditionalized depending 4# on which program is running, or what terminal is active. 5# 6 7# In all programs, all terminals, make sure this is bound. 8"\C-x\C-r": re-read-init-file 9 10# Hp terminals (and some others) have ugly default behaviour for C-h. 11"\C-h": backward-delete-char 12"\e\C-h": backward-kill-word 13"\C-xd": dump-functions 14 15# In xterm windows, make the arrow keys do the right thing. 16$if TERM=xterm 17"\e[A": previous-history 18"\e[B": next-history 19"\e[C": forward-char 20"\e[D": backward-char 21 22# alternate arrow key prefix 23"\eOA": previous-history 24"\eOB": next-history 25"\eOC": forward-char 26"\eOD": backward-char 27 28# Under Xterm in Bash, we bind local Function keys to do something useful. 29$if Bash 30"\e[11~": "Function Key 1" 31"\e[12~": "Function Key 2" 32"\e[13~": "Function Key 3" 33"\e[14~": "Function Key 4" 34"\e[15~": "Function Key 5" 35 36# I know the following escape sequence numbers are 1 greater than 37# the function key. Don't ask me why, I didn't design the xterm terminal. 38"\e[17~": "Function Key 6" 39"\e[18~": "Function Key 7" 40"\e[19~": "Function Key 8" 41"\e[20~": "Function Key 9" 42"\e[21~": "Function Key 10" 43$endif 44$endif 45 46# For Bash, all terminals, add some Bash specific hacks. 47$if Bash 48"\C-xv": show-bash-version 49"\C-x\C-e": shell-expand-line 50 51# Here is one for editing my path. 52"\C-xp": "$PATH\C-x\C-e\C-e\"\C-aPATH=\":\C-b" 53 54# Make C-x r read my mail in emacs. 55# "\C-xr": "emacs -f rmail\C-j" 56$endif 57 58# For FTP, different hacks: 59$if Ftp 60"\C-xg": "get \M-?" 61"\C-xt": "put \M-?" 62"\M-.": yank-last-arg 63$endif 64 65" ": self-insert 66