Skip to main content
fixed grammar and improved formatting in question field
Link

bash Bash completion is very incomplete on centos 7

edited tags
Link
Gilles 'SO- stop being evil'
  • 865.3k
  • 205
  • 1.8k
  • 2.3k
added 760 characters in body
Source Link
ted
  • 633
  • 2
  • 6
  • 14

I have installed bash completion using yum install --enablerepo=epel bash-completion. While it works for some basic commands (git & yum), I am missing a large part of the completers.

My /etc/bash_completion.d contains the following:

bash_completion.d]$ ls
git iprutils redefine_filedir yum yummain.py yum-utils.bash

However, I know there is bash_completion for i.e. make (which is installed) and a lot more, compare i.e. to the sample output here.

How can I get the missing completer scripts? (Preferably with yum, so I do not have to update them manually)

If it matters: tab completion works, but I am not sourcing anything in my .bashrc. It just started working after installing the package.


UPDATE: After checking the version of bash completion I have installed as @fduff suggested I saw the following:

$ yum list installed | grep completion
bash-completion.noarch 1:2.1-6.el7 @base

However trying uninstalling it and forcing centos to install bash_completion from the epel repository with sudo yum install --enablerepo=epel bash-completion --disablerepo=base yielded package not found.

Further checking yielded that the new package which is now in @base puts the completion files into /usr/share/bash-completion/completions, however I am still missing some, i.e. ssh and sudo (kind of sucks that sudo command [tab] does not complete while command [tab] does), furthermore I sitll can't find the bit for make (which should list the targets that are in Makefile)


UPDATE2: The changelog states:

  • Fri Nov 01 2013 Petr Stodulka [email protected] - 2.1-6
    • Install only available completions (#810343 - comment 15) without "tar" and remove the other.
  • Fri Sep 13 2013 Roman Rakus [email protected] - 2.1-5
    • Added one more missing conditional Resolves: #1007839
  • Fri Sep 13 2013 Roman Rakus [email protected] - 2.1-4
    • Added conditionals to not add completions for some commands; the packages has their own completions Resolves: #1007839

Thus reinstalling sudo, after I had bash_completion installed worked for the sudo completion, however I had no such luck with make.

QUESTION: How to enable make bash completion in Centos 7?

I have installed bash completion using yum install --enablerepo=epel bash-completion. While it works for some basic commands (git & yum), I am missing a large part of the completers.

My /etc/bash_completion.d contains the following:

bash_completion.d]$ ls
git iprutils redefine_filedir yum yummain.py yum-utils.bash

However, I know there is bash_completion for i.e. make (which is installed) and a lot more, compare i.e. to the sample output here.

How can I get the missing completer scripts? (Preferably with yum, so I do not have to update them manually)

If it matters: tab completion works, but I am not sourcing anything in my .bashrc. It just started working after installing the package.


UPDATE: After checking the version of bash completion I have installed as @fduff suggested I saw the following:

$ yum list installed | grep completion
bash-completion.noarch 1:2.1-6.el7 @base

However trying uninstalling it and forcing centos to install bash_completion from the epel repository with sudo yum install --enablerepo=epel bash-completion --disablerepo=base yielded package not found.

Further checking yielded that the new package which is now in @base puts the completion files into /usr/share/bash-completion/completions, however I am still missing some, i.e. ssh and sudo (kind of sucks that sudo command [tab] does not complete while command [tab] does), furthermore I sitll can't find the bit for make (which should list the targets that are in Makefile)

I have installed bash completion using yum install --enablerepo=epel bash-completion. While it works for some basic commands (git & yum), I am missing a large part of the completers.

My /etc/bash_completion.d contains the following:

bash_completion.d]$ ls
git iprutils redefine_filedir yum yummain.py yum-utils.bash

However, I know there is bash_completion for i.e. make (which is installed) and a lot more, compare i.e. to the sample output here.

How can I get the missing completer scripts? (Preferably with yum, so I do not have to update them manually)

If it matters: tab completion works, but I am not sourcing anything in my .bashrc. It just started working after installing the package.


UPDATE: After checking the version of bash completion I have installed as @fduff suggested I saw the following:

$ yum list installed | grep completion
bash-completion.noarch 1:2.1-6.el7 @base

However trying uninstalling it and forcing centos to install bash_completion from the epel repository with sudo yum install --enablerepo=epel bash-completion --disablerepo=base yielded package not found.

Further checking yielded that the new package which is now in @base puts the completion files into /usr/share/bash-completion/completions, however I am still missing some, i.e. ssh and sudo (kind of sucks that sudo command [tab] does not complete while command [tab] does), furthermore I sitll can't find the bit for make (which should list the targets that are in Makefile)


UPDATE2: The changelog states:

  • Fri Nov 01 2013 Petr Stodulka [email protected] - 2.1-6
    • Install only available completions (#810343 - comment 15) without "tar" and remove the other.
  • Fri Sep 13 2013 Roman Rakus [email protected] - 2.1-5
    • Added one more missing conditional Resolves: #1007839
  • Fri Sep 13 2013 Roman Rakus [email protected] - 2.1-4
    • Added conditionals to not add completions for some commands; the packages has their own completions Resolves: #1007839

Thus reinstalling sudo, after I had bash_completion installed worked for the sudo completion, however I had no such luck with make.

QUESTION: How to enable make bash completion in Centos 7?

added 486 characters in body
Source Link
ted
  • 633
  • 2
  • 6
  • 14
Loading
added 437 characters in body; edited title
Source Link
ted
  • 633
  • 2
  • 6
  • 14
Loading
Source Link
ted
  • 633
  • 2
  • 6
  • 14
Loading