Score:0

variable expansion problem

gh flag

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?

bac0n avatar
cn flag
`shopt -s direxpand`, you may want to add it to `~/.bashrc`
nobody avatar
gh flag
Hm but why it is working when I change LANG before? But I will try the answers thank you.
bac0n avatar
cn flag
I haven't been able to reproduce your problem but the *LANG=C* example, even if it's desirable, is the one not working.
bac0n avatar
cn flag
Somehow autocomplete isn't able to resolve the path in that example.
Score:0
gh flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.