本教程操作环境:linux5.9.8系统、Dell G3电脑。
linux bind是什么?
Linux bind命令
【资料图】
Linux bind命令用于显示或设置键盘按键与其相关的功能。
您可以利用bind命令了解有哪些按键组合与其功能,也可以自行指定要用哪些按键组合。
语法
bind [-dlv][-f <按键配置文件>][-m <按键配置>][-q <功能>]
参数说明:
-d 显示按键配置的内容。-f<按键配置文件> 载入指定的按键配置文件。-l 列出所有的功能。-m<按键配置> 指定按键配置。-q<功能> 显示指定功能的按键。-v 列出目前的按键配置与其功能。
实例
显示按键组合的所有功能
# bind -l //显示按键组合的内容abortaccept-linealias-expand-linearrow-key-prefixbackward-bytebackward-charbackward-delete-charbackward-kill-linebackward-kill-wordbackward-wordbeginning-of-historybeginning-of-line……省略部分内容vi-goto-markvi-insert-begvi-insertion-modevi-matchvi-movement-modevi-next-wordvi-overstrikevi-overstrike-deletevi-prev-wordvi-putvi-redovi-replacevi-ruboutvi-searchvi-search-againvi-set-markvi-substvi-tilde-expandvi-yank-argvi-yank-toyankyank-last-argyank-nth-argyank-pop
显示当前按键组合的设置
# bind -labortaccept-linealias-expand-linearrow-key-prefixbackward-bytebackward-charbackward-delete-charbackward-kill-linebackward-kill-wordbackward-wordbeginning-of-historybeginning-of-linecall-last-kbd-macrocapitalize-wordcharacter-searchcharacter-search-backwardclear-screencompletecomplete-commandcomplete-filenamecomplete-hostnamecomplete-into-bracescomplete-usernamecomplete-variablecopy-backward-wordcopy-forward-wordcopy-region-as-killdabbrev-expanddelete-chardelete-char-or-listdelete-horizontal-spacedigit-argumentdisplay-shell-versiondo-lowercase-versiondowncase-worddump-functionsdump-macrosdump-variablesdynamic-complete-historyedit-and-execute-commandemacs-editing-modeend-kbd-macroend-of-historyend-of-lineexchange-point-and-markforward-backward-delete-charforward-byteforward-charforward-search-historyforward-wordglob-complete-wordglob-expand-wordglob-list-expansionshistory-and-alias-expand-linehistory-expand-linehistory-search-backwardhistory-search-forwardinsert-commentinsert-completionsinsert-last-argumentkill-linekill-regionkill-whole-linekill-wordmagic-spacemenu-completemenu-complete-backwardnext-historynon-incremental-forward-search-historynon-incremental-forward-search-history-againnon-incremental-reverse-search-historynon-incremental-reverse-search-history-againold-menu-completeoperate-and-get-nextoverwrite-modepossible-command-completionspossible-completionspossible-filename-completionspossible-hostname-completionspossible-username-completionspossible-variable-completionsprevious-historyquoted-insertredraw-current-linere-read-init-filereverse-search-historyrevert-lineself-insertset-markshell-backward-kill-wordshell-backward-wordshell-expand-lineshell-forward-wordshell-kill-wordskip-csi-sequencestart-kbd-macrotab-inserttilde-expandtranspose-charstranspose-wordstty-statusundouniversal-argumentunix-filename-ruboutunix-line-discardunix-word-ruboutupcase-wordvi-append-eolvi-append-modevi-arg-digitvi-back-to-indentvi-bwordvi-bWordvi-change-casevi-change-charvi-change-tovi-char-searchvi-columnvi-completevi-deletevi-delete-tovi-editing-modevi-end-wordvi-eof-maybevi-ewordvi-eWordvi-fetch-historyvi-first-printvi-fwordvi-fWordvi-goto-markvi-insert-begvi-insertion-modevi-matchvi-movement-modevi-next-wordvi-overstrikevi-overstrike-deletevi-prev-wordvi-putvi-redovi-replacevi-ruboutvi-searchvi-search-againvi-set-markvi-substvi-tilde-expandvi-yank-argvi-yank-toyankyank-last-argyank-nth-argyank-poproot@snail-hnlinux:~# root@snail-hnlinux:~# root@snail-hnlinux:~# root@snail-hnlinux:~# root@snail-hnlinux:~# bind -vset bind-tty-special-chars onset blink-matching-paren onset byte-oriented offset completion-ignore-case offset convert-meta offset disable-completion offset echo-control-characters onset enable-keypad offset enable-meta-key onset expand-tilde offset history-preserve-point offset horizontal-scroll-mode offset input-meta onset mark-directories onset mark-modified-lines offset mark-symlinked-directories offset match-hidden-files onset meta-flag onset output-meta onset page-completions onset prefer-visible-bell onset print-completions-horizontally offset revert-all-at-newline offset show-all-if-ambiguous offset show-all-if-unmodified offset skip-completed-text offset visible-stats offset bell-style audibleset comment-begin #set completion-prefix-display-length 0set completion-query-items 100set editing-mode emacsset history-size 1000set keymap emacs
列出指定功能的按键和按键组合
# bind -q abort//请用 调用abort “C-g”, “C-xC-g”, “eC-g”.# bind -q accept-line //列出功能“accept-line”按键以及组合按键//请用 调用accept-line “C-j”, “C-m”.
推荐学习:《linux视频教程》
以上就是linux bind是什么的详细内容,更多请关注php中文网其它相关文章!