Is there any way to make Bash tab complete case insensitively?
$ bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) Copyright (C) 2007 Free Software Foundation, Inc.
I am using Mac OS X 10.6
Update the text in
set completion-ignore-case on
Restructured with the benefit of hindsight to contrast the pros and cons of using
Note: Command-line editing in Bash is provided by the Readline library; customizing it is non-trivial, but well worth learning; its features include the ability to define custom keyboard shortcuts for inserting predefined snippets of text - see Command Line Editing in the Bash Reference Manual
To persistently make tab-completion case-insensitive in Bash:
Option A: If you either already have:
you're planning to customize the readline library extensively and/or want to make customizations effective for scripts too when they call
to either file, depending on whether you want the setting to be effective for all users or the current user (create the file, if necessary).
A related command that makes completion of file and directory names easier is:
This makes it unnecessary to press Tab twice when there is more than one match.
Option B: Alternatively, you may add Readline commands to your user-specific
As implied above, Readline configuration defined this way will not take effect in scripts that call