linux bind命令有什么作用

服务器   发布日期:2023年11月13日   浏览次数:835

这篇文章主要介绍了linux bind命令有什么作用的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇linux bind命令有什么作用文章都会有所收获,下面我们一起来看看吧。

linux bind是一个用于显示或设置键盘按键与其相关功能的命令,可以利用bind命令了解有哪些按键组合与其功能,也可以自行指定要用哪些按键组合;其使用语法是“bind [-dlv][-f <...>][-m <...>][-q <...>]”。

Linux bind命令

Linux bind命令用于显示或设置键盘按键与其相关的功能。

您可以利用bind命令了解有哪些按键组合与其功能,也可以自行指定要用哪些按键组合。

语法

  1. bind [-dlv][-f <按键配置文件>][-m <按键配置>][-q <功能>]

参数说明:

  1. -d  显示按键配置的内容。
  2. -f<按键配置文件>  载入指定的按键配置文件。
  3. -l  列出所有的功能。
  4. -m<按键配置>  指定按键配置。
  5. -q<功能>  显示指定功能的按键。
  6. -v  列出目前的按键配置与其功能。

实例

显示按键组合的所有功能

  1. # bind -l //显示按键组合的内容
  2. abort
  3. accept-line
  4. alias-expand-line
  5. arrow-key-prefix
  6. backward-byte
  7. backward-char
  8. backward-delete-char
  9. backward-kill-line
  10. backward-kill-word
  11. backward-word
  12. beginning-of-history
  13. beginning-of-line
  14. ……省略部分内容
  15. vi-goto-mark
  16. vi-insert-beg
  17. vi-insertion-mode
  18. vi-match
  19. vi-movement-mode
  20. vi-next-word
  21. vi-overstrike
  22. vi-overstrike-delete
  23. vi-prev-word
  24. vi-put
  25. vi-redo
  26. vi-replace
  27. vi-rubout
  28. vi-search
  29. vi-search-again
  30. vi-set-mark
  31. vi-subst
  32. vi-tilde-expand
  33. vi-yank-arg
  34. vi-yank-to
  35. yank
  36. yank-last-arg
  37. yank-nth-arg
  38. yank-pop

显示当前按键组合的设置

  1. # bind -l
  2. abort
  3. accept-line
  4. alias-expand-line
  5. arrow-key-prefix
  6. backward-byte
  7. backward-char
  8. backward-delete-char
  9. backward-kill-line
  10. backward-kill-word
  11. backward-word
  12. beginning-of-history
  13. beginning-of-line
  14. call-last-kbd-macro
  15. capitalize-word
  16. character-search
  17. character-search-backward
  18. clear-screen
  19. complete
  20. complete-command
  21. complete-filename
  22. complete-hostname
  23. complete-into-braces
  24. complete-username
  25. complete-variable
  26. copy-backward-word
  27. copy-forward-word
  28. copy-region-as-kill
  29. dabbrev-expand
  30. delete-char
  31. delete-char-or-list
  32. delete-horizontal-space
  33. digit-argument
  34. display-shell-version
  35. do-lowercase-version
  36. downcase-word
  37. dump-functions
  38. dump-macros
  39. dump-variables
  40. dynamic-complete-history
  41. edit-and-execute-command
  42. emacs-editing-mode
  43. end-kbd-macro
  44. end-of-history
  45. end-of-line
  46. exchange-point-and-mark
  47. forward-backward-delete-char
  48. forward-byte
  49. forward-char
  50. forward-search-history
  51. forward-word
  52. glob-complete-word
  53. glob-expand-word
  54. glob-list-expansions
  55. history-and-alias-expand-line
  56. history-expand-line
  57. history-search-backward
  58. history-search-forward
  59. insert-comment
  60. insert-completions
  61. insert-last-argument
  62. kill-line
  63. kill-region
  64. kill-whole-line
  65. kill-word
  66. magic-space
  67. menu-complete
  68. menu-complete-backward
  69. next-history
  70. non-incremental-forward-search-history
  71. non-incremental-forward-search-history-again
  72. non-incremental-reverse-search-history
  73. non-incremental-reverse-search-history-again
  74. old-menu-complete
  75. operate-and-get-next
  76. overwrite-mode
  77. possible-command-completions
  78. possible-completions
  79. possible-filename-completions
  80. possible-hostname-completions
  81. possible-username-completions
  82. possible-variable-completions
  83. previous-history
  84. quoted-insert
  85. redraw-current-line
  86. re-read-init-file
  87. reverse-search-history
  88. revert-line
  89. self-insert
  90. set-mark
  91. shell-backward-kill-word
  92. shell-backward-word
  93. shell-expand-line
  94. shell-forward-word
  95. shell-kill-word
  96. skip-csi-sequence
  97. start-kbd-macro
  98. tab-insert
  99. tilde-expand
  100. transpose-chars
  101. transpose-words
  102. tty-status
  103. undo
  104. universal-argument
  105. unix-filename-rubout
  106. unix-line-discard
  107. unix-word-rubout
  108. upcase-word
  109. vi-append-eol
  110. vi-append-mode
  111. vi-arg-digit
  112. vi-back-to-indent
  113. vi-bword
  114. vi-bWord
  115. vi-change-case
  116. vi-change-char
  117. vi-change-to
  118. vi-char-search
  119. vi-column
  120. vi-complete
  121. vi-delete
  122. vi-delete-to
  123. vi-editing-mode
  124. vi-end-word
  125. vi-eof-maybe
  126. vi-eword
  127. vi-eWord
  128. vi-fetch-history
  129. vi-first-print
  130. vi-fword
  131. vi-fWord
  132. vi-goto-mark
  133. vi-insert-beg
  134. vi-insertion-mode
  135. vi-match
  136. vi-movement-mode
  137. vi-next-word
  138. vi-overstrike
  139. vi-overstrike-delete
  140. vi-prev-word
  141. vi-put
  142. vi-redo
  143. vi-replace
  144. vi-rubout
  145. vi-search
  146. vi-search-again
  147. vi-set-mark
  148. vi-subst
  149. vi-tilde-expand
  150. vi-yank-arg
  151. vi-yank-to
  152. yank
  153. yank-last-arg
  154. yank-nth-arg
  155. yank-pop
  156. root@snail-hnlinux:~#
  157. root@snail-hnlinux:~#
  158. root@snail-hnlinux:~#
  159. root@snail-hnlinux:~#
  160. root@snail-hnlinux:~# bind -v
  161. set bind-tty-special-chars on
  162. set blink-matching-paren on
  163. set byte-oriented off
  164. set completion-ignore-case off
  165. set convert-meta off
  166. set disable-completion off
  167. set echo-control-characters on
  168. set enable-keypad off
  169. set enable-meta-key on
  170. set expand-tilde off
  171. set history-preserve-point off
  172. set horizontal-scroll-mode off
  173. set input-meta on
  174. set mark-directories on
  175. set mark-modified-lines off
  176. set mark-symlinked-directories off
  177. set match-hidden-files on
  178. set meta-flag on
  179. set output-meta on
  180. set page-completions on
  181. set prefer-visible-bell on
  182. set print-completions-horizontally off
  183. set revert-all-at-newline off
  184. set show-all-if-ambiguous off
  185. set show-all-if-unmodified off
  186. set skip-completed-text off
  187. set visible-stats off
  188. set bell-style audible
  189. set comment-begin #
  190. set completion-prefix-display-length 0
  191. set completion-query-items 100
  192. set editing-mode emacs
  193. set history-size 1000
  194. set keymap emacs

列出指定功能的按键和按键组合

  1. # bind -q abort
  2. //请用 调用abort “C-g”, “C-xC-g”, “eC-g”.
  3. # bind -q accept-line //列出功能“accept-line”按键以及组合按键
  4. //请用 调用accept-line “C-j”, “C-m”.

以上就是linux bind命令有什么作用的详细内容,更多关于linux bind命令有什么作用的资料请关注九品源码其它相关文章!