The officially official Devuan Forum!

You are not logged in.

#1 2018-05-13 11:26:28

rsevero
Member
Registered: 2018-05-13
Posts: 12  

Several bash completions unavailable

Hi,

I noticed that several bash completions weren't available, Like apt for example.

After I included the following line at the end of /usr/share/bash-completion/bash_completion I got all missing bash completions:

. /usr/share/bash-completion/completions/*

Why isn't this directory being sourced automatically?

Offline

#2 2018-05-13 15:46:57

golinux
Administrator
Registered: 2016-11-25
Posts: 3,316  

Re: Several bash completions unavailable

Does that happen on Debian also?  I assume so since we pull it directly from their repos.   Please file a bug upstream if there isn't one already.

Offline

#3 2018-05-14 13:17:37

rsevero
Member
Registered: 2018-05-13
Posts: 12  

Re: Several bash completions unavailable

golinux wrote:

Does that happen on Debian also?  I assume so since we pull it directly from their repos.   Please file a bug upstream if there isn't one already.

I'm not sure as I have never used debian but I will look for a bug and fill a new one if necessary.

Thanks!

Offline

#4 2018-05-14 13:22:14

KatolaZ
Member
Registered: 2017-03-11
Posts: 79  

Re: Several bash completions unavailable

Sorry if this sounds silly, but please consider that /etc/bash_completion is *not* included by default in your bashrc/profile. So in order for the completions to work you have to explicitly source /etc/bash_completion in your bashrc/profile.

My2Cents

Offline

#5 2018-05-14 13:28:33

rsevero
Member
Registered: 2018-05-13
Posts: 12  

Re: Several bash completions unavailable

KatolaZ wrote:

Sorry if this sounds silly, but please consider that /etc/bash_completion is *not* included by default in your bashrc/profile. So in order for the completions to work you have to explicitly source /etc/bash_completion in your bashrc/profile.

That could definitely be the problem but I already uncommented the lines that source /usr/share/bash-completion/bash_completion in my profile.

After that I had to also include

. /usr/share/bash-completion/completions/*

at the end of /usr/share/bash-completion/bash_completion to get several bash completions to work.

For example, apt package names bash completion only worked after that. Are apt package names bash completion working for you?

Offline

#6 2018-05-14 13:38:28

KatolaZ
Member
Registered: 2017-03-11
Posts: 79  

Re: Several bash completions unavailable

I have always sourced only "/etc/bash_completion" (which, BTW, sources /usr/share/bash-completion/bash_completion, which in turns loads all the completions under /usr/share/bash-completion/completions/ ...) and I don't use apt :-)

Offline

#7 2018-05-14 13:43:19

rsevero
Member
Registered: 2018-05-13
Posts: 12  

Re: Several bash completions unavailable

KatolaZ wrote:

I have always sourced only "/etc/bash_completion" (which, BTW, sources /usr/share/bash-completion/bash_completion, which in turns loads all the completions under /usr/share/bash-completion/completions/ ...) and I don't use apt :-)

AFAICT the problem is exactly that /usr/share/bash-completion/bash_completion doesn't source /usr/share/bash-completion/completions

I had to manually include

. /usr/share/bash-completion/completions/*

in /usr/share/bash-completion/bash_completion to get /usr/share/bash-completion/completions completions.

Offline

#8 2018-05-14 15:33:43

golinux
Administrator
Registered: 2016-11-25
Posts: 3,316  

Re: Several bash completions unavailable

KatolaZ wrote:

Sorry if this sounds silly, but please consider that /etc/bash_completion is *not* included by default in your bashrc/profile. So in order for the completions to work you have to explicitly source /etc/bash_completion in your bashrc/profile.

My2Cents

I have never touched my bash profile and bash_completion has always worked.  Maybe that's an Xfce thing?

Offline

Board footer