3

When I use environment variable name and press Tab for auto-complete on Ubuntu 20.04 LTS terminal (I have tested both the terminal which comes with Ubuntu 20.04 LTS install and Terminator, same behavior on both), Ubuntu inserts backslash \ before dollar sign $, causing the environment variable not to work anymore as intended.

For example, previously on Ubuntu 18.04 LTS terminal:

ll $HOME/Deskt (+TAB) -> ll $HOME/Desktop/

Now on Ubuntu 20.04 LTS terminal:

ll $HOME/Deskt (+TAB) -> ll \$HOME/Desktop/

Needless to say, the latter results in

ls: cannot access '$HOME/Desktop/': No such file or directory

So how can I disable the automatic \ insert?

Kulfy
  • 17,696

1 Answers1

5

Add the following line to your ~/.bashrc:

shopt -s direxpand

then run this command to apply the changes:

source ~/.bashrc