inputrc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # .inputrc: initialization file for readline
  2. #
  3. # for more information on how this file works, please see the
  4. # initialization file section of the readline(3) man page
  5. #
  6. # quick dirty little note:
  7. # to get the key sequence for binding, you can abuse bash.
  8. # while running bash, hit ctrl+v, and then type the key sequence.
  9. # so, typing 'alt + left arrow' in konsole gets you back:
  10. # ^[[1;3D
  11. # the readline entry to make this skip back a word will then be:
  12. # "\e[1;3D" backward-word
  13. #
  14. # do not bell on tab-completion
  15. set bell-style none
  16. # 8bit settings
  17. set meta-flag on
  18. set input-meta on
  19. set convert-meta off
  20. set output-meta on
  21. # append a slash to completed names which are symbolic links to directories
  22. set mark-symlinked-directories on
  23. $if mode=vi
  24. set keymap vi-command
  25. "\e[A": history-search-backward
  26. "\e[B": history-search-forward
  27. "\e[5~": history-search-backward
  28. "\e[6~": history-search-forward
  29. set keymap vi-insert
  30. "\e[A": history-search-backward
  31. "\e[B": history-search-forward
  32. "\e[5~": history-search-backward
  33. "\e[6~": history-search-forward
  34. $endif
  35. $if mode=emacs
  36. # for linux console and rh/debian xterm
  37. # allow the use of the home/end keys
  38. "\e[1~": beginning-of-line
  39. "\e[4~": end-of-line
  40. # allow the use of the delete/insert keys
  41. "\e[3~": delete-char
  42. "\e[2~": quoted-insert
  43. # use up/down arrows to search history
  44. "\e[A": history-search-backward
  45. "\e[B": history-search-forward
  46. "\e[5~": history-search-backward
  47. "\e[6~": history-search-forward
  48. # mappings for ctrl-left-arrow and ctrl-right-arrow for word moving
  49. "\e[1;5C": forward-word
  50. "\e[1;5D": backward-word
  51. "\e[5C": forward-word
  52. "\e[5D": backward-word
  53. "\e\e[C": forward-word
  54. "\e\e[D": backward-word
  55. $if term=rxvt
  56. "\e[8~": end-of-line
  57. "\eOc": forward-word
  58. "\eOd": backward-word
  59. $endif
  60. $endif