In the previous versions of Ubuntu 18.04, the variables in Bash are expanded when I press the Tab key. But in Ubuntu 20.04 (using bash 5.0.16), the variables are not expanded. Instead, the dollar sign $
before the variable gets proceeded by a backslash.
For example, let's say, I have a variable MY_DIRECTORY
:
export MY_DIRECTORY=/path/to/a/folder
Now when I write something like this:
ls $MY_DIRECTORY<Tab key>
I get:
ls \$MY_DIRECTORY
As you can see, the variable doesn't expand to the desired path. What is wrong with that?
bash-completion
and the specific patches that each Linux distribution apply to both of these. – philb May 17 '22 at 22:23