Advertisement
Yunga

inputrc

May 25th, 2013
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. # /etc/inputrc - global inputrc for libreadline -- by [email protected]
  2.  
  3. $include /etc/inputrc
  4.  
  5. ### Be 8 bit clean.
  6. set input-meta on
  7. set output-meta on
  8. set meta-flag on
  9. set convert-meta off
  10. # *?* this is the default on debian
  11. set byte-oriented off
  12.  
  13. ### Keyboard
  14. # bind the control characters of the kernel's terminal driver
  15. set bind-tty-special-chars on
  16. # echoes a character corresponding to a signal generated from the keyboard
  17. set echo-control-characters on
  18. # some systems need this to enable the keypad
  19. set enable-keypad off
  20. # enable any meta modifier key the terminal claims to support, used to send eight-bit characters
  21. set enable-meta-key on
  22.  
  23. ### Editing mode
  24. # emacs or vi, choose your poison...
  25. set editing-mode emacs
  26. # emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert
  27. set keymap emacs
  28.  
  29. # *?* highlight parenthesis, brakets
  30. set blink-matching-paren on
  31. # horizontal scroll for command editing, this one cause problems with the correct display of $PS1
  32. set horizontal-scroll-mode off
  33.  
  34.  
  35. ### Bell
  36. # none, visible, audible
  37. set bell-style visible
  38. # *?* i guess it's about flashing the screen like bell-style
  39. set prefer-visible-bell on
  40.  
  41. ### Completion
  42. # we want completion enabled
  43. set disable-completion off
  44. # filename matching and completion in a case-insensitive fashion
  45. set completion-ignore-case on
  46. # if ignore case is set, map - to _
  47. set completion-map-case on
  48. # tilde expansion when attempting word completion
  49. set expand-tilde on
  50. # set which characters should teminate an incremental search (ESC and C-J)
  51. #set isearch-terminators
  52. # the leading '.' must be supplied by the user in the filename to be completed
  53. set match-hidden-files off
  54. # if completing in the middle of a word, dont duplicate text
  55. set skip-completed-text on
  56.  
  57. ### Completion list
  58. # ask to display more than 128 items
  59. set completion-query-items 128
  60. # do not uses an internal pager to display screens of possible completions
  61. set page-completions off
  62. # width is the terminal width
  63. set completion-display-width -1
  64. # add an ellipsis for completion longer than 16 characters
  65. set completion-prefix-display-length 16
  66. # completions sorted vertically
  67. set print-completions-horizontally off
  68. # words with more than one completion are be listed immediately
  69. set show-all-if-ambiguous on
  70. # *?*
  71. set show-all-if-unmodified on
  72. # add @, /, *, = to filetype in completion list
  73. set visible-stats on
  74. # completed directory names have a slash appended
  75. set mark-directories on
  76. # symbolic links to directories have a slash appended
  77. set mark-symlinked-directories on
  78.  
  79.  
  80. ### History
  81. # attempts to place the point at the same location on each history line retrieved
  82. set history-preserve-point off
  83. # maximum number of history entries saved (0 for unlimited)
  84. set history-size 1024
  85. # display an asterisk (`*') at the start of history lines which have been modified
  86. set mark-modified-lines off
  87. # undo all changes to history before returning when accept-line is executed
  88. set revert-all-at-newline off
  89.  
  90.  
  91. ################################################################################
  92. $if bash
  93.  
  94. # string to insert at the start of the line with insert-comment
  95. set comment-begin #
  96.  
  97. # Completion
  98. Tab: menu-complete
  99. "\e[Z": menu-complete-backward
  100. #Control-Tab: dynamic-complete-history
  101.  
  102. "\M-!": complete-command
  103. "\M-/": complete-filename
  104. "\M-@": complete-hostname
  105. "\M-{": complete-into-braces
  106. "\M-~": complete-username
  107. "\M-$": complete-variable
  108.  
  109. # History (Up/Down arrowns)
  110. "\e[A": history-search-backward
  111. "\e[B": history-search-forward
  112.  
  113. # Word move (Control-Left/Right arrows)
  114. "\e[1;5D": backward-word
  115. "\e[1;5C": forward-word
  116.  
  117. # edit path
  118. "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
  119.  
  120. "\C-w": unix-filename-rubout
  121.  
  122. Meta-Rubout: unix-filename-rubout
  123.  
  124. # Meta+O can be made to load the previous command and position the cursor for typing an option
  125. "\M-o": "\C-p\C-a\M-f "
  126.  
  127. # Dump
  128. "\C-xf": dump-functions
  129. "\C-xv": dump-variables
  130. "\C-xm": dump-macros
  131.  
  132.  
  133. # Magic space
  134. Space: magic-space
  135.  
  136. $endif
  137.  
  138.  
  139. ################################################################################
  140. $if Ftp
  141. "\C-xg": "get \M-?"
  142. "\C-xp": "put \M-?"
  143. "\M-.": yank-last-arg
  144. $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement