久久精品五月,日韩不卡视频在线观看,国产精品videossex久久发布 ,久久av综合

站長資訊網
最全最豐富的資訊網站

深入淺出了解Linux和MacOS終端大小寫敏感問題(附代碼)

之前的文章《一文講解ajax實現無刷新上傳和下載(代碼詳解)》中,給大家了解了ajax實現無刷新上傳和下載。下面本篇文章給大家了解Linux和MacOS終端大小寫敏感問題,伙伴們來看看吧。

深入淺出了解Linux和MacOS終端大小寫敏感問題(附代碼)

Linux和MacOS終端提示大小寫不敏感

打開終端,并cd到用戶home目錄,輸入:

echo "set completion-ignore-case on" >> .inputrc

關閉再重新打開終端即可

如果你只想快速解決上面的問題,直接看第三部分即可。

inputrc 文件介紹

Bash和其它大多數shell使用Readline庫作為其輸入相關的庫。Readline庫有一些默認的鍵盤映射,除此之外,也可以通過修改inputrc文件來定制鍵盤映射。

inputrc文件時Readline庫的啟動文件,當使用Readline作為輸入庫的程序啟動時,它會自動讀取inputrc配置文件,初始化自定義的鍵盤映射。

inputrc文件的位置由shell的環境變量INPUTRC控制,如果該變量沒有設置,缺省的inputrc文件的路徑是~/.inputrc

如果該文件~/.inputrc不存在,就會使用系統級(對所有用戶生效)的inputrc文件/etc/inputrc。如果某個用戶需要修改系統默認的 inputrc配置,可以改動~/.inputrc,這樣會覆蓋系統的默認配置。

關于如何編輯inputrc文件的信息,運行info bash,參考bashinfo頁的Readline Init File這一節,運行info readline以參考readline自己的info頁。

inputrc 配置

inputrc文件中,有兩種配置:一種是inputrc變量,一種是鍵盤映射。 注意,在配置該文件時,注釋必須占單獨的一行,否則可能會有問題。

inputrc變量配置

變量配置的語法如下:

set variable value

常見的變量和配置如下:

completion-ignore-case #如果設置為開(on),在自動補全時不區分大小寫。該配置默認是關。  show-all-if-ambiguous #這個配置該變了自動補全函數的默認行為。如果設置為開(on),當自動補全的結果有一個以上時,會直接列出這些結果。如果設置為關(off),就會提示一個beep蜂鳴聲,當再按下tab時才會列出自動補全的結果。默認這項配置為關。  bell-style #Controls what happens when Readline wants to ring the terminal bell. If set to ‘none’, Readline never rings the bell. If set to ‘visible’, Readline uses a visible bell if one is available. If set to ‘audible’ (the default), Readline attempts to ring the terminal's bell.  bind-tty-special-chars #If set to ‘on’, Readline attempts to bind the control characters treated specially by the kernel's terminal driver to their Readline equivalents.  comment-begin #The string to insert at the beginning of the line when the insert-comment command is executed. The default value is "#". completion-prefix-display-length  #When set to a value greater than zero, common prefixes longer than this value are replaced with an ellipsis when displaying possible completions. #e.g. set completion-prefix-display-length 4  completion-query-items #The number of possible completions that determines when the user is asked whether the list of possibilities should be displayed. If the number of possible completions is greater than this value, Readline will ask the user whether or not he wishes to view them; otherwise, they are simply listed. This variable must be set to an integer value greater than or equal to 0. A negative value means Readline should never ask. The default limit is 100.  convert-meta #If set to ‘on’, Readline will convert characters with the eighth bit set to an ascii key sequence by stripping the eighth bit and prefixing an <ESC> character, converting them to a meta-prefixed key sequence. The default value is ‘on’.  disable-completion #If set to ‘On’, Readline will inhibit word completion. Completion characters will be inserted into the line as if they had been mapped to self-insert. The default is ‘off’.  editing-mode #The editing-mode variable controls which default set of key bindings is used. By default, Readline starts up in Emacs editing mode, where the keystrokes are most similar to Emacs. This variable can be set to either ‘emacs’ or ‘vi’.  echo-control-characters #When set to ‘on’, on operating systems that indicate they support it, readline echoes a character corresponding to a signal generated from the keyboard. The default is ‘on’.  enable-keypad #When set to ‘on’, Readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys. The default is ‘off’.  enable-meta-key #When set to ‘on’, Readline will try to enable any meta modifier key the terminal claims to support when it is called. On many terminals, the meta key is used to send eight-bit characters. The default is ‘on’.  expand-tilde #If set to ‘on’, tilde expansion is performed when Readline attempts word completion. The default is ‘off’.  history-preserve-point #If set to ‘on’, the history code attempts to place the point (the current cursor position) at the same location on each history line retrieved with previous-history or next-history. The default is ‘off’.  history-size #Set the maximum number of history entries saved in the history list. If set to zero, the number of entries in the history list is not limited.  horizontal-scroll-mode #This variable can be set to either ‘on’ or ‘off’. Setting it to ‘on’ means that the text of the lines being edited will scroll horizontally on a single screen line when they are longer than the width of the screen, instead of wrapping onto a new screen line. By default, this variable is set to ‘off’.  input-meta #If set to ‘on’, Readline will enable eight-bit input (it will not clear the eighth bit in the characters it reads), regardless of what the terminal claims it can support. The default value is ‘off’. The name meta-flag is a synonym for this variable.  isearch-terminators #The string of characters that should terminate an incremental search without subsequently executing the character as a command. If this variable has not been given a value, the characters <ESC> and C-J will terminate an incremental search.  keymap #Sets Readline's idea of the current keymap for key binding commands. Acceptable keymap names are emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert. vi is equivalent to vi-command; emacs is equivalent to emacs-standard. The default value is emacs. The value of the editing-mode variable also affects the default keymap.  mark-directories #If set to ‘on’, completed directory names have a slash appended. The default is ‘on’.  mark-modified-lines #This variable, when set to ‘on’, causes Readline to display an asterisk (*) at the start of history lines which have been modified. This variable is ‘off’ by default.  mark-symlinked-directories #If set to ‘on’, completed names which are symbolic links to directories have a slash appended (subject to the value of mark-directories). The default is ‘off’.  match-hidden-files #This variable, when set to ‘on’, causes Readline to match files whose names begin with a ‘.’ (hidden files) when performing filename completion, unless the leading ‘.’ is supplied by the user in the filename to be completed. This variable is ‘on’ by default.  output-meta #If set to ‘on’, Readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape sequence. The default is ‘off’.  page-completions #If set to ‘on’, Readline uses an internal more-like pager to display a screenful of possible completions at a time. This variable is ‘on’ by default.  print-completions-horizontally #If set to ‘on’, Readline will display completions with matches sorted horizontally in alphabetical order, rather than down the screen. The default is ‘off’.  revert-all-at-newline If set to ‘on’, Readline will undo all changes to history lines before returning when accept-line is executed. By default, history lines can be modified and retain individual undo lists across calls to readline. The default is ‘off’.  show-all-if-unmodified #This alters the default behavior of the completion functions in a fashion similar to show-all-if-ambiguous. If set to ‘on’, words which have more than one possible completion without any possible partial completion (the possible completions don't share a common prefix) cause the matches to be listed immediately instead of ringing the bell. The default value is ‘off’.  skip-completed-text #If set to ‘on’, this alters the default completion behavior when inserting a single match into the line. It's only active when performing completion in the middle of a word. If enabled, readline does not insert characters from the completion that match characters after point in the word being completed, so portions of the word following the cursor are not duplicated. For instance, if this is enabled, attempting completion when the cursor is after the ‘e’ in ‘Makefile’ will result in ‘Makefile’ rather than ‘Makefilefile’, assuming there is a single possible completion. The default value is ‘off’.  visible-stats #If set to ‘on’, a character denoting a file's type is appended to the filename when listing possible completions. The default is ‘off’.

鍵盤映射配置

配置inputrc變量的語法如下:

keyname: function-name or macro  #keyname必須是英文,可以是Control-u、Control-k等。并且keyname和冒號之間不能有空格,如果有空格會被認為是keyname的一部分。keyname的寫法多樣,取決于自己的喜好。 #下面是一些鍵盤映射配置的例子:  Control-u: universal-argument C-u is bound to the function universal-argument  Meta-Rubout: backward-kill-word M-DEL is bound to the function backward-kill-word  Control-o: "> output" C-o is bound to run the macro expressed on the right hand side (that is, to insert the text ‘> output’ into the line)  Control-j: menu-complete C-j is bound to cycle through the available tab completions.  Control-k: menu-complete-backward C-k is bound to cycle backwards through the available tab completions.  "t": menu-complete Use tab to cycle through all the possible completions.  "C-p": history-search-backward Map control-p to allow search for completions to the current line from your history. e.g. type “git” and then hit control-p to cycle through all the recent git commands.  "ep": history-search-backward Map escape-p to allow search for completions to the current line from your history. e.g. type “git” and then hit escape-p to cycle through all the recent git commands.  "e[A": history-search-backward Map Up arrow to allow search for completions to the current line from your history. e.g. type “git” and then hit UP to cycle through all the recent git commands.  "e[B": history-search-forward Map Down arrow to allow search for completions to the current line from your history. e.g. type “git” and then hit DOWN to cycle back through all the recent git commands.  "C-d": kill-whole-line Map control-d to kill the whole line.

設置MacOS下自動補全不區分大小寫

通過上面的介紹,解決這個問題應該是綽綽有余了。打開用戶主目錄下的文件~/.inputrc(如果沒有的話,就新建該文件),在其中添加如下配置:

# 設置自動補全不區分大小寫 set completion-ignore-case on # 當有一個以上自動補全結果時,直接列出,不用beep提示 set show-all-if-ambiguous on

保存該文件,然后,重啟命令行,就會發現自動補全不區分大小寫已經生效了。 網上好多結果中,還需要多加一個下面的配置:

TAB: menu-complete

這個配置的目的是,在列出自動補全的結果之后,再按一次tab鍵,就會自動在自動補全列表中選擇,而不是一直展示自動補全列表。

推薦學習:Mac OS入門教程、Linux視頻教程

贊(0)
分享到: 更多 (0)
?
網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號
久久精品五月,日韩不卡视频在线观看,国产精品videossex久久发布 ,久久av综合
国内自拍视频一区二区三区| 国产精品不卡| 国产精品一区亚洲| 欧美亚洲在线日韩| 国产精品亚洲四区在线观看| 国产麻豆一区二区三区精品视频| 国产成人精品一区二区免费看京 | 国产一区三区在线播放| 日韩不卡一二三区| 91精品国产自产精品男人的天堂| 亚洲小说春色综合另类电影| 久久成人亚洲| 亚洲精品九九| 国产亚洲精品精品国产亚洲综合| 日韩激情一区二区| 欧美精品福利| 欧美成a人片免费观看久久五月天| 日韩久久99| 国产精品久久久久9999高清| 你懂的网址国产 欧美| 黄色aa久久| 日韩不卡视频在线观看| a国产在线视频| 欧美日韩精品一本二本三本| 日韩高清一区| 亚洲一区二区三区久久久| 国产探花一区| 国产 日韩 欧美 综合 一区| 一区二区三区四区在线看| 91精品尤物| 欧美日韩激情| 麻豆一区二区99久久久久| 欧美不卡视频| 国产免费av国片精品草莓男男| 欧美激情国产在线| 日韩和欧美的一区| 亚洲福利精品| 欧美一级久久| 欧美搞黄网站| 麻豆高清免费国产一区| 亚洲欧美日韩国产一区| 91视频精品| 国产精品久久久久久av公交车| 亚洲激情国产| 午夜精品成人av| 国产精品嫩草影院在线看| 悠悠资源网久久精品| 98精品久久久久久久| 国产亚洲精aa在线看| 中文字幕乱码亚洲无线精品一区| 欧美日韩尤物久久| 国产a亚洲精品| 日韩精品亚洲aⅴ在线影院| 91久久在线| 波多野结衣一区| 国精品一区二区三区| 日韩欧美综合| 亚洲成人va| 日韩免费久久| 亚洲国产欧美日本视频| 麻豆精品久久| 精品黄色一级片| 91一区二区三区四区| 高清一区二区| 丁香婷婷久久| 欧美精品资源| 午夜精品一区二区三区国产| 大香伊人久久精品一区二区| 国产精品115| 国产一区二区三区四区二区 | 国产欧美日韩在线一区二区 | 欧美在线黄色| 国产欧美日本| 色综合狠狠操| 国户精品久久久久久久久久久不卡 | 久久uomeier| 日韩精品不卡一区二区| 五月天久久777| 亚洲三级精品| 国产精品伦一区二区| 精品黄色一级片| 欧洲av一区二区| 蜜臀久久99精品久久久画质超高清 | 视频一区在线播放| 日韩精品视频中文字幕| 国产精品99久久免费| 精品免费av在线| 日韩一区二区三区四区五区| 久久wwww| 91久久黄色| 久久99久久久精品欧美| 激情综合亚洲| 国产视频一区二| 久久九九电影| 日韩精品午夜视频| 精品久久99| 视频一区二区欧美| yellow在线观看网址| 国产一区二区高清| 国产一区二区三区久久| 日韩在线播放一区二区| 国产精品久久观看| 婷婷综合成人| 欧美精品一区二区久久| 久久亚洲国产精品尤物| 欧美日韩国产亚洲一区| 国产精品777777在线播放| 视频精品一区二区| 电影亚洲精品噜噜在线观看| 日韩欧美激情电影| 久久久五月天| 国产一区二区三区探花| 日韩va亚洲va欧美va久久| 欧美日韩中文字幕一区二区三区| 欧美激情在线精品一区二区三区| 亚洲综合欧美| 国产一区亚洲| 色婷婷久久久| 日韩中文在线电影| 国产精品久久久久久妇女| 亚洲一区有码| 色网在线免费观看| 亚洲网站视频| 国产精品99视频| 99pao成人国产永久免费视频| 国产精品一线| 国产精品任我爽爆在线播放| 欧美成人基地 | 99精品视频在线观看免费播放| 日韩精品水蜜桃| 色婷婷综合网| 久久影院资源站| 精品国产精品久久一区免费式 | 免费在线观看一区二区三区| 国产一区清纯| 日韩中文字幕av电影| 亚洲天堂日韩在线| 日本不卡视频在线| 国产精品日本一区二区不卡视频| 国产精品高清一区二区| 国产精品扒开腿做爽爽爽软件| 欧美激情日韩| 麻豆视频在线看| 夜夜嗨网站十八久久| 深夜日韩欧美| 激情久久99| 日本一区二区免费高清| 久久精品国产亚洲夜色av网站| 美女久久一区| 国产精品极品在线观看| 亚洲精品.com| 亚洲精品美女91| 精品美女视频| 亚洲精品成人| 国产图片一区| 激情欧美日韩一区| 国产乱码精品一区二区三区四区| 久久精品免费看| 99re国产精品| 捆绑调教美女网站视频一区| 欧美jjzz| 日韩中文字幕| 久久天堂成人| 麻豆成人综合网| 亚洲人成亚洲精品| 日韩三区在线| 精品无人区麻豆乱码久久久| 欧美福利专区| 精品久久久亚洲| 亚洲精品字幕| 日韩欧美自拍| 三上悠亚国产精品一区二区三区 | 国产一区二区精品久| 不卡福利视频| 亚洲特级毛片| 国产日韩三级| 丝袜亚洲精品中文字幕一区| 精品久久美女| 91麻豆精品激情在线观看最新| 亚洲国内欧美| 精品国产亚洲一区二区三区在线| 中文字幕中文字幕精品| 午夜电影亚洲| 99久久夜色精品国产亚洲1000部| 国产视频一区二区在线播放| 四虎国产精品免费久久| 91精品丝袜国产高跟在线| 欧美高清一区| 136国产福利精品导航网址| 国产精品一区三区在线观看| 久久成人精品| 爽爽淫人综合网网站| 中日韩男男gay无套| 欧美女激情福利| 夜夜嗨av一区二区三区网站四季av| 日韩欧美午夜| 久久精品高清| 精品1区2区3区4区| 久久国产成人午夜av影院宅| 国语精品一区|