Friday 4 October 2013

How to get bash to stop escaping $ during tab-completion

Once upon a time I could type
ls $HOME/f
and bash would expand this to whatever file started with 'f', or a list of all the candidates.

Now (2013 - and for quite some long irritating time) bash has been "improved" so that the above request shows:
ls \$HOME/f
which is completely useless.
(Who did that help?   What problem did it fix?)

The old behaviour can be restored by putting this in some bashrc, or executing it within bash:
shopt -s direxpand
... presuming that you have a sufficiently recent version of bash to have both the problem and the capacity to fix it. Sigh.

No comments:

Post a Comment