You’d like to adjust the way bash handles input, especially command completion. For example, you’d like it to be case-insensitive.
Edit or create a ~/.inputrc or /etc/inputrc file as appropriate. There are many parameters you can adjust to your liking.
To have readline use your file when it initializes, set $INPUTRC; for example, set INPUTRC=’~/.inputrc’.
To re-read the file and apply or test after making changes, use bind -f filename.
We recommend you explore the bind command and the readline documentation, especially bind -v, bind -l, bind -s, and bind -p, though the last one is rather long and cryptic.
Some useful settings for users from other environments, notably Windows, are (see the section “Readline Init File Syntax” in Appendix A):
# settings/inputrc: # readline settings
# To re-read (and implement changes to this file) use:
# bind -f $SETTINGS/inputrc
# First, include any systemwide bindings and variable
# assignments from /etc/inputrc
# (fails silently if file doesn't exist)
# Ignore case when doing completion
set completion-ignore-case on
# Completed dir names have a slash appended
set mark-directories on
# Completed names which are symlinks to dirs have a slash appended
set mark-symlinked-directories on
# List ls -F for completion
set visible-stats on
# Cycle through ambiguous completions instead of list
# Set bell to audible
set bell-style audible
# List possible completions instead of ringing bell
set show-all-if-ambiguous on
# From the readline documentation at
# Macros that are convenient for shell interaction
# edit the path
# prepare to type a quoted word -- insert open and close double quotes
# and move to just after the open quote
# insert a backslash (testing backslash escapes in sequences and macros)
# Quote the current or previous word
# Add a binding to refresh the line, which is unbound
# Edit variable on current line.
You will want to experiment with these and other settings. Also note the $include to use thesystem settings, but make sure you can change them if you like.
Many people are not aware of how customizable, not to mention powerful and flexible, the GNU Readline library is.
Having said that, there is no “one size fits all” approach. You should work out a configuration that suits your needs and habits.
Note the first time readline is called it performs its normal startup file processing, including looking at $INPUTRC, or defaulting to ~/.inputrc if that’s not set.