You are not logged in.
As title, I've installed bash-completion and finding that it does not do autocomplete with git. e.g.
git chec***tab***
Then nothing. Same for
apt-get inst***tab***
I note that this is solved by doing
. /usr/share/bash-completion/completions/git
or
. /etc/bash_completion
but why is this not setup by default when you install the bash-completion package? Surely one of these scripts should automatically be run when opening bash?
Last edited by devian (2020-11-09 11:37:32)
Offline
Does it work if you log in to the console (TTY) screen?
EDIT: un-comment the section in ~/.bashrc (for just your user) or /etc/bash.bashrc (for all users).
Last edited by Head_on_a_Stick (2020-11-10 17:11:02)
Brianna Ghey — Rest In Power
Offline
Yes, if I ctrl-alt-f1, login and try tabbing out commands then completion works fine.
Uncomment which section?
Thanks
Offline
Yes, if I ctrl-alt-f1, login and try tabbing out commands then completion works fine.
It doesn't work on the desktop because SLiM doesn't read ~/.profile or /etc/profile{,.d/*}.
Uncomment which section?
This bit:
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
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
Brianna Ghey — Rest In Power
Offline
I don't have that in my .profile file. Should I have it in there do you think?
I did
apt-get install --reinstall bash-completion
but there is still nothing in .profile.
Offline
there is still nothing in .profile.
un-comment the section in ~/.bashrc
Brianna Ghey — Rest In Power
Offline
I do not have anything related to bash-completion in my .profile or .bashrc
I note that on Debian it does automatically insert the code you quoted into .bashrc when you install the package.
What a strange issue...
Offline
I do not have anything related to bash-completion in my .profile or .bashrc
How about in /etc/skel/.bashrc? It should be the final stanza in that file and that file should be copied to $HOME when your user is created.
I note that on Debian it does automatically insert the code you quoted into .bashrc when you install the package.
I don't think so.
Brianna Ghey — Rest In Power
Offline
Yes, the bash-completion setup code exists in /etc/skel/.bashrc. I created a new user and yes, the correct code is in their bashrc.
I admit defeat - all I will say is I think that these issues arose because I have been using Devuan for a while so gone through at least one upgrade cycle.
Is it possible that in the previous major release of Devuan these problems I mentioned were present and have been carried across to my current setup?
Offline
Is it possible that in the previous major release of Devuan these problems I mentioned were present and have been carried across to my current setup?
It's certainly possible that the bash-completion package worked differently in the past and so your old ~/.bashrc doesn't work with it now.
Brianna Ghey — Rest In Power
Offline
It's certainly possible that the bash-completion package worked differently in the past and so your old ~/.bashrc doesn't work with it now.
Okay, let's go with that then. Even Debian has issues when you upgrade between versions as opposed to doing an installation from fresh.
Offline