Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

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

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

#Ubuntu
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.

autocd:checkwinsize:cmdhist:expand_aliases:extglob:extquote:force_fignore:histappend:interactive_comments:progcomp:promptvars:sourcepath

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

1 Answer 1

up vote 0 down vote accepted

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

https://bugs.launchpad.net/ubuntu/+source/bash/+bug/778627/

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.