Two useful bash settings

  1. bind "set completion-ignore-case on"
  2. bind "set mark-symlinked-directories on"

I’ve been using completion-ignore-case for a while, it auto completes without taking case into account. This is great most of the time, but one issue that comes up every now and then is that using wild cards will only match the specified case, that is c* will only match files starting with a lowercase c, so the command will have to be invoked with both c* and C*.

I just added mark-symlinked-directories. It automatically adds a slash after relative links to directories when autocompleting. This was appearently the behavior in old version of Bash, but was changed since there was then no way to autocomplete just the symlink (if for instance you want to do rm symlink). Very annoying that it was turned off since I’m using a lot of symlinks now, and even more annoying that it took me this long to investigate if it could be fixed.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options