Score:0

Ubuntu Terminal using bash autocompletes only using alt+tab

be flag

I'm using Ubuntu 22.04 lts.

When I like to use the Tab to autocomplete any command, i.e cd /path/to/file, vim /path/to/file, apt, etc, pressing the Tab key itself won't do anything. Instead, if I hold Alt+Tab, it then behaves as I'd like to see.

How can I change the behavior so that pressing Tab alone completes the bash statement?

Score:0
co flag
1. Open the file /etc/bash.bashrc by vim to edit it.
sudo vim /etc/bash.bashrc
2. Find these code
#enable bash completion in interactive shells
#if ! shopt -oq posix; then
#      if [-f  /usr/share/bash-completion/bash_completion ]; then
#          . /usr/share/bash-completion/bash_completion
#      elif [ -f /etc/bash_completion]; then
#           . /etc/bash_completion
#      fi
#fi
3. Unlock these code by delete '#'
#enable bash completion in interactive shells
if ! shopt -oq posix; then
     if [-f  /usr/share/bash-completion/bash_completion ]; then
          . /usr/share/bash-completion/bash_completion
      elif [ -f /etc/bash_completion]; then
           . /etc/bash_completion
      fi
fi

when finished, use :wq to save and quit.

4. enable the change by reload it.
sudo source /etc/bash.bashrc
I sit in a Tesla and translated this thread with Ai:

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.