Strange difference in bash behavior across systems

Posted by pinkie_d_pie_0228 on Super User See other posts from Super User or by pinkie_d_pie_0228
Published on 2012-11-12T22:59:55Z Indexed on 2012/11/12 23:04 UTC
Read the original article Hit count: 398

Filed under:

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.

© Super User or respective owner

Related posts about bash