You are not logged in.

#1 2023-08-14 07:52:45

icefox99
Member
Registered: 2023-05-24
Posts: 11

How do I enable tab completion in bash? [Solved]

Its still working as root however under my main user profile I somehow disabled it.
What do I add to my bashrc to get it back to normal?

Last edited by icefox99 (2023-08-16 20:59:41)

Offline

#2 2023-08-14 10:36:10

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,893

Re: How do I enable tab completion in bash? [Solved]

Some Terminal Emulators seem to have trouble with tab completion , which one are you using ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2023-08-14 15:13:00

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,320

Re: How do I enable tab completion in bash? [Solved]

echo $BASH_COMPLETION_VERSINFO

If that's empty, you likely end up not sourcing /usr/share/bash-completion/bash_completion, reason: unknown, but your ~/.bashrc, ~/.bash_profile are probably good things to look at.
Also

pacman -Qikk bash

(it's sourced by the default /etc/bash.bashrc)

Online

#4 2023-08-14 17:06:22

icefox99
Member
Registered: 2023-05-24
Posts: 11

Re: How do I enable tab completion in bash? [Solved]

My terminal emulator is Konsole

echo $BASH_COMPLETION_VERSINFO

outputs "2"

Offline

#5 2023-08-14 19:41:05

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,320

Re: How do I enable tab completion in bash? [Solved]

The tab key generally works (in konsole, producing a tab)?
Do you also have the problem w/ a fresh user account?
Please post your bash config files (~/.bashrc & ~/.bash_profile)

Online

#6 2023-08-15 05:59:30

icefox99
Member
Registered: 2023-05-24
Posts: 11

Re: How do I enable tab completion in bash? [Solved]

my bash_profile file is missing however I do still have a bashrc file that is mostly empty it just has synth-shell in it

##-----------------------------------------------------
## synth-shell-prompt.sh
if [ -f /home/fox/.config/synth-shell/synth-shell-prompt.sh ] && [ -n "$( echo $- | grep i )" ]; then
	source /home/rabbit/.config/synth-shell/synth-shell-prompt.sh
fi

Last edited by icefox99 (2023-08-15 06:07:52)

Offline

#7 2023-08-15 06:05:55

icefox99
Member
Registered: 2023-05-24
Posts: 11

Re: How do I enable tab completion in bash? [Solved]

Just tested with a fresh user account and it works fine so I guess something just happened to mine. I copied over the default bashrc and profile with it to see if that helped and it did not.

Offline

#8 2023-08-15 06:35:55

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,320

Re: How do I enable tab completion in bash? [Solved]

echo $SHELL
echo $TERM
cat /proc/$$/cmdline
bash -i -x 2>&1 | tee /tmp/bash.log # there try to autocomplete something, exit the shell and post
cat /tmp/bash.log | curl -F 'file=@-' 0x0.st

Online

#9 2023-08-15 22:03:58

icefox99
Member
Registered: 2023-05-24
Posts: 11

Re: How do I enable tab completion in bash? [Solved]

Offline

#10 2023-08-16 07:19:46

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,320

Re: How do I enable tab completion in bash? [Solved]

Did you try to autocomplete anything during that run?

++ [[ /usr/share/bash-completion/bash_completion != \/\h\o\m\e\/\r\a\b\b\i\t\/\.\b\a\s\h\_\c\o\m\p\l\e\t\i\o\n ]]
if [ -f /home/fox/.config/synth-shell/synth-shell-prompt.sh ] && [ -n "$( echo $- | grep i )" ]; then
	source /home/rabbit/.config/synth-shell/synth-shell-prompt.sh
fi

Who's br'er rabbit?

Cause

+ source /home/fox/.config/synth-shell/synth-shell-prompt.sh

you're actually sourcing that from br'er fox.

Generally, remove that for the moment.

Online

#11 2023-08-16 15:06:57

icefox99
Member
Registered: 2023-05-24
Posts: 11

Re: How do I enable tab completion in bash? [Solved]

idk removed synth and that was a old username

Offline

#12 2023-08-16 15:10:18

icefox99
Member
Registered: 2023-05-24
Posts: 11

Re: How do I enable tab completion in bash? [Solved]

I reset my bash fully to what was in /etc/skel/ but still did not fix much idk what happened to my user profile

Offline

#13 2023-08-16 15:12:18

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,320

Re: How do I enable tab completion in bash? [Solved]

Please don't bump, edit your post if nobody has replied.
Does the tab key generally work as expected in your shell?
Try a different TE (xterm)

Why is there a bashrc in your /etc/skel?

Online

#14 2023-08-16 15:14:43

icefox99
Member
Registered: 2023-05-24
Posts: 11

Re: How do I enable tab completion in bash? [Solved]

Idk why there is one but there is XD
When I try to use other terminal emulators (xterm) it still does not seem to work it just does tab spacing
(yet when I run su or go to another user profile works perfectly)

Last edited by icefox99 (2023-08-16 15:16:28)

Offline

#15 2023-08-16 15:37:00

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,320

Re: How do I enable tab completion in bash? [Solved]

pacman -Qo /etc/skel/*

Also, wrt your previous bash trace:

seth wrote:

Did you try to autocomplete anything during that run?

Cause there's no indication the autocompletion was ever triggered.

echo $SHELL # just to be sure you're not looking at fish or so…
cat ~/.inputrc

Online

#16 2023-08-16 20:58:08

icefox99
Member
Registered: 2023-05-24
Posts: 11

Re: How do I enable tab completion in bash? [Solved]

figured it out turns out for some reason "set disable-completion on" was in my .inputrc idk why I did not catch this but thx for the help

Offline

Board footer

Powered by FluxBB