Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two systems, an Ubuntu computer and an Android tablet. I have built and configured bash for Android to be used in adb, so it's the same version as my Ubuntu bash, and they use mostly the same bashrc and configuration, and the same exact options set by shopt.

However, there is a slight difference in that the Android bash behaves as I expect when I I try to tab-complete something using a variable in it, but the Ubuntu bash doesn't.

 ls $HOME/loc<tab> => ls $HOME/local #As expected

Basically, the variable is taken into account when completing. But then

ls $HOME/loc<tab> => ls \$HOME/loc #Undesired behavior.

The list of options is as follows, and is the same in both builds of bash.


What can be making the Ubuntu version escape the $ instead of using it for completion as in the Android build? What can I do to make both work the same way? Any help will be greatly appreciated.

share|improve this question
What version of ubuntu / bash are you running? – Paul Nov 13 '12 at 1:27
Ubuntu 12.10, bash 4.2.37(1). – pinkie_d_pie_0228 Nov 13 '12 at 4:59
up vote 0 down vote accepted

The bash package 4.2-0ubuntu3 exhibits this problem, as per this bug:

Apparently this in an issue with bash itself, so right now, your option is to download and compile an upstream copy of bash to run on your machine.

share|improve this answer
Oh, I completely didn't think it'd be a distro bug, believe it or not. Easy fix then, I'll just build my own. Thanks for letting me know and providing the launchpad bug link! – pinkie_d_pie_0228 Nov 13 '12 at 2:57
I have built bash, but it still does the same thing...this must be a problem with something else. – pinkie_d_pie_0228 Nov 13 '12 at 4:59
The problem seems to be related to bash-completion. I am not sure of how to fix it, but doesn't look like a problem in bash itself. – pinkie_d_pie_0228 Nov 13 '12 at 6:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .