Inputrc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. # Copyright (C) 1989-2009 Free Software Foundation, Inc.
  7. #
  8. # This program is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation, either version 3 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. #
  21. # In all programs, all terminals, make sure this is bound.
  22. "\C-x\C-r": re-read-init-file
  23. # Hp terminals (and some others) have ugly default behaviour for C-h.
  24. "\C-h": backward-delete-char
  25. "\e\C-h": backward-kill-word
  26. "\C-xd": dump-functions
  27. # In xterm windows, make the arrow keys do the right thing.
  28. $if TERM=xterm
  29. "\e[A": previous-history
  30. "\e[B": next-history
  31. "\e[C": forward-char
  32. "\e[D": backward-char
  33. # alternate arrow key prefix
  34. "\eOA": previous-history
  35. "\eOB": next-history
  36. "\eOC": forward-char
  37. "\eOD": backward-char
  38. # Under Xterm in Bash, we bind local Function keys to do something useful.
  39. $if Bash
  40. "\e[11~": "Function Key 1"
  41. "\e[12~": "Function Key 2"
  42. "\e[13~": "Function Key 3"
  43. "\e[14~": "Function Key 4"
  44. "\e[15~": "Function Key 5"
  45. # I know the following escape sequence numbers are 1 greater than
  46. # the function key. Don't ask me why, I didn't design the xterm terminal.
  47. "\e[17~": "Function Key 6"
  48. "\e[18~": "Function Key 7"
  49. "\e[19~": "Function Key 8"
  50. "\e[20~": "Function Key 9"
  51. "\e[21~": "Function Key 10"
  52. $endif
  53. $endif
  54. # For Bash, all terminals, add some Bash specific hacks.
  55. $if Bash
  56. "\C-xv": show-bash-version
  57. "\C-x\C-e": shell-expand-line
  58. # Here is one for editing my path.
  59. "\C-xp": "$PATH\C-x\C-e\C-e\"\C-aPATH=\":\C-b"
  60. # Make C-x r read my mail in emacs.
  61. # "\C-xr": "emacs -f rmail\C-j"
  62. $endif
  63. # For FTP, different hacks:
  64. $if Ftp
  65. "\C-xg": "get \M-?"
  66. "\C-xt": "put \M-?"
  67. "\M-.": yank-last-arg
  68. $endif
  69. " ": self-insert