121308Sache# My ~/.inputrc file is in -*- text -*- for easy editing with Emacs. 221308Sache# 321308Sache# Notice the various bindings which are conditionalized depending 421308Sache# on which program is running, or what terminal is active. 521308Sache# 621308Sache 7119610Sache# Copyright (C) 1989-2002 Free Software Foundation, Inc. 8119610Sache# 9119610Sache# This program is free software; you can redistribute it and/or modify 10119610Sache# it under the terms of the GNU General Public License as published by 11119610Sache# the Free Software Foundation; either version 2, or (at your option) 12119610Sache# any later version. 13119610Sache# 14119610Sache# This program is distributed in the hope that it will be useful, 15119610Sache# but WITHOUT ANY WARRANTY; without even the implied warranty of 16119610Sache# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17119610Sache# GNU General Public License for more details. 18119610Sache# 19119610Sache# You should have received a copy of the GNU General Public License 20119610Sache# along with this program; if not, write to the Free Software 21119610Sache# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. 22119610Sache 2321308Sache# In all programs, all terminals, make sure this is bound. 2421308Sache"\C-x\C-r": re-read-init-file 2521308Sache 2621308Sache# Hp terminals (and some others) have ugly default behaviour for C-h. 2721308Sache"\C-h": backward-delete-char 2821308Sache"\e\C-h": backward-kill-word 2921308Sache"\C-xd": dump-functions 3021308Sache 3121308Sache# In xterm windows, make the arrow keys do the right thing. 3221308Sache$if TERM=xterm 3321308Sache"\e[A": previous-history 3421308Sache"\e[B": next-history 3521308Sache"\e[C": forward-char 3621308Sache"\e[D": backward-char 3721308Sache 3821308Sache# alternate arrow key prefix 3921308Sache"\eOA": previous-history 4021308Sache"\eOB": next-history 4121308Sache"\eOC": forward-char 4221308Sache"\eOD": backward-char 4321308Sache 4421308Sache# Under Xterm in Bash, we bind local Function keys to do something useful. 4521308Sache$if Bash 4621308Sache"\e[11~": "Function Key 1" 4721308Sache"\e[12~": "Function Key 2" 4821308Sache"\e[13~": "Function Key 3" 4921308Sache"\e[14~": "Function Key 4" 5021308Sache"\e[15~": "Function Key 5" 5121308Sache 5221308Sache# I know the following escape sequence numbers are 1 greater than 5321308Sache# the function key. Don't ask me why, I didn't design the xterm terminal. 5421308Sache"\e[17~": "Function Key 6" 5521308Sache"\e[18~": "Function Key 7" 5621308Sache"\e[19~": "Function Key 8" 5721308Sache"\e[20~": "Function Key 9" 5821308Sache"\e[21~": "Function Key 10" 5921308Sache$endif 6021308Sache$endif 6121308Sache 6221308Sache# For Bash, all terminals, add some Bash specific hacks. 6321308Sache$if Bash 6421308Sache"\C-xv": show-bash-version 6521308Sache"\C-x\C-e": shell-expand-line 6621308Sache 6721308Sache# Here is one for editing my path. 6821308Sache"\C-xp": "$PATH\C-x\C-e\C-e\"\C-aPATH=\":\C-b" 6921308Sache 7021308Sache# Make C-x r read my mail in emacs. 7121308Sache# "\C-xr": "emacs -f rmail\C-j" 7221308Sache$endif 7321308Sache 7421308Sache# For FTP, different hacks: 7521308Sache$if Ftp 7621308Sache"\C-xg": "get \M-?" 7721308Sache"\C-xt": "put \M-?" 7821308Sache"\M-.": yank-last-arg 7921308Sache$endif 8021308Sache 8121308Sache" ": self-insert 82