James Carter changed bug 905348
What Removed Added
CC   jimc@math.ucla.edu

Comment # 33 on bug 905348 from
Mee2!  
Versions: OpenSuSE "Leap" 42.1, bash-4.2-78.1.x86_64
>From patch SUSE-RU-2016:1515-1 (2016-06-07) mentioned in comment 32.

In my ~/.bashrc I put "shopt -s direxpand" and that solves the problem
of tab-completing a command argument where the user typed a shell
variable.  E.g. 
    I type ls $HOME/.s (tab), expands to /root/.ssh/
    Then I type kno (tab), expands to  /root/.ssh/known_hosts
    I hit Return and "ls" shows /root/.ssh/known_hosts
This is all my idea of correct behavior and reproduces the behavior
seen before the above patch.  Do "shopt direxpand" to see what
the current state of this option is.

See also Ubuntu bug 778627
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/778627
with a long discussion of what they did or didn't do 3 years
ago about this
issue, and one or two intemperate comments.  One user points out
that the patch (bash - 4.2-2ubuntu2.1 (2013-04-09) for Precise
Pangolin) is not a "fix" but rather a "workaround", because it
adds a new Bash option "direxpand" which is off by default, and
to get the fix the user has to turn it on, whereas a "fix" would
restore the original non-buggy behavior.  Jimc says: any chance
of turning on direxpand by default, as a disto-specific "feature"?

Bash completion is a can of worms with a lot of user training
and maintenance burden, and changes occurring at random which 
greatly annoy the users.  I commiserate with werner Fink who has to
balance competing values: user stability, useful functionality, and
lack of control by the distro of what happens upstream.


You are receiving this mail because: