[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash autocompletion

Dave Sherohman <esper@sherohman.org> writes:

> So now for my own pet bash completion peeve:  Having to hit tab twice
> when dealing with a symlink to a directory.  Can this be changed in
> /etc/bash_completion so that symlinks to directories will behave
> identically to real directories?  (A quick grep for "sym" shows that
> it does not appear in the file and grepping man bash for "completion"
> and "symbolic" didn't turn up anything useful.)  Or, better, is there
> a way to make this change on a per-user basis?

Well, I had no idea about /etc/bash_completion. Intrigued, I hit the
docs in /usr/share/doc/bash and saw this in README.Debian.gz which may
or may not answer your question above:

    0. symlinked directory completion behavior

       Starting with readline-4.2a, completion on symlinks that point
       to directories does not append the slash. To restore the behaviour
       found in readline-4.2, add to /etc/inputrc or ~/.inputrc:

	   set mark-symlinked-directories on

Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.

Reply to: