Configure bash for Linux to ignore command case and to display the history of the command by pressing the "up" key according to the input command header

Source: Internet
Author: User

In general, Bash is case-sensitive to commands, and can display the previous history command when you press the "Up" button. However, this is not very convenient, the following configuration, you can let bash ignore the case, and can be based on the input command header press "Up" key to display the history of the command, such as: input vim, and then press "Up" key, at this time, you can display the last time you run vim that command, very convenient!

Below is the content of this configuration, placed under the user's home directory:

[Email protected]:~$ cat. Inputrc set completion-ignore-case on#for Single Press Tab results for when a partial or no comp Letion is Possibleset show-all-if-ambiguous on#for results when no completion is Possibleset show-all-if-unmodified On#His Tory completion bound to arrow keys (off, up) "\e[a": History-search-backward "\e[b": History-search-forward#bash allows t O quickly move between words with Ctrl+left and ctrl+right "\e[1;5c": Forward-word "\e[1;5d": Backward-word "\e[5c": Forward -word "\e[5d": Backward-word "\e\e[c": Forward-word "\e\e[d": Backward-word "




Configure bash for Linux to ignore command case and to display the history of the command by pressing the "up" key according to the input command header

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.