0

I'm running lubuntu 20.04 bare installation no docker involved.

env | grep -i shell
SHELL=/bin/bash

whenever I try to let expand system variablen like $HOME auto complete is not working correct. Example $HOME

echo $HOME
/home/alex

correct set.

     cat \$HOME/zu_entfernende_Kernel 
cat: '$HOME/zu_entfernende_Kernel': Datei oder Verzeichnis nicht gefunden

when I hit tab for autocomplete,$HOME is expand to \$HOME sorry for german output, but the error seems to have something to do with my locale.

Note when I use

LANG=C 

before it is working as expected.

alex@Guilmon:~$ LANG=C
alex@Guilmon:~$ cat $HOME/zu_entfernende_Kernel
linux-headers-5.3.0-62
linux-headers-5.3.0-62-generic
linux-image-5.3.0-62-generic
alex@Guilmon:~$ 

locale Information

    localectl status
   System Locale: LANG=de_DE.UTF-8
       VC Keymap: de
      X11 Layout: de
       X11 Model: pc105
     X11 Options: caps:none

any idea how I can pin the error down?

nobody
  • 5,437
  • shopt -s direxpand, you may want to add it to ~/.bashrc –  Nov 09 '21 at 17:56
  • Hm but why it is working when I change LANG before? But I will try the answers thank you. – nobody Nov 09 '21 at 18:26
  • I haven't been able to reproduce your problem but the LANG=C example, even if it's desirable, is the one not working. –  Nov 10 '21 at 13:46
  • Somehow autocomplete isn't able to resolve the path in that example. –  Nov 10 '21 at 13:46

1 Answers1

0

easy solution in my case erase $HOME/.bashrc.

From the original file in /etc/skel/.bashrc

if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion

Means read this file if it is present. and here is this for me bothering feature.

# Turn on extended globbing and programmable completion
shopt -s extglob progcomp
nobody
  • 5,437