LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   wildcard tab complete not working as expected in centos 7 (https://www.linuxquestions.org/questions/centos-111/wildcard-tab-complete-not-working-as-expected-in-centos-7-a-4175579939/)

nclear 05-16-2016 01:05 PM

wildcard tab complete not working as expected in centos 7
 
Hi,
I am trying to use an * to tab complete a system path. This used to work in CentOS 6 but it is not working CentOS 7.

What I want it to do is is this: when I type this

Code:

ls -al /etc/sysconfig/*n
and then hit <tab><tab> it will autocomplete to this

Code:

ls -al /etc/sysconfig/rhn/
Then I can continue typing the path. Right now when I hit <tab><tab> nothing happens...

This currently works: If I were to just hit enter at

Code:

[root@dhcp_test ~]# ls -al /etc/sysconfig/*n
total 48
drwxr-xr-x. 5 root root 4096 May 10 06:22 .
drwxr-xr-x. 7 root root 4096 May 10 09:15 ..
drwxr-xr-x. 4 root root  37 May 10 05:58 allowed-actions
drwxr-xr-x. 2 root root  104 May 10 06:10 clientCaps.d
-rw-r--r--. 1 root root  124 May 10 06:20 image.cfg
-rw-------. 1 root root  129 May 10 10:41 osad-auth.conf
-rw-rw-r--. 1 root root 1825 May 10 06:22 osad.conf
-rw-r--r--. 1 root root 1458 May 10 06:20 rhncfg-client.conf
-rw-r--r--. 1 root root 1316 May 10 06:20 rhncfg-manager.conf
-rw-r--r--. 1 root root  13 May 10 06:20 rhnsd
-rw-r--r--. 1 root root 1143 May 10 06:20 studio-kvm-template.xml
-rw-r--r--. 1 root root  936 May 10 06:20 studio-xen-template.xml
-rw-------. 1 root root 1321 May 10 06:20 systemid
-rw-r--r--. 1 root root 1984 May 10 06:20 up2date
drwxr-xr-x. 3 root root  17 May 10 06:09 virt

it is able to figure out what I want and do ls -al of the rhn directory, but I dont want to have to hit enter, I want to be able to tab-complete the path so I can keep going down the path.

I have bash completion installed. I have been trying to compare my shopt and complete options between CentOS 6 and CentOS 7 - and so far I have been unsuccessful. They are the same or the changes that I have done have no effect.

Does anyone have any suggestions?

nclear 05-16-2016 03:11 PM

well... I removed the bash-completion rpm. and now it works... everything works... even tab complete of commands, which is what I thought that rpm did.

I'm at a loss, but at least it is working now.

EDIT:
I figured out what the bash-completion rpm does it enables you to tab complete out a whole command like
Code:

systemctl is-enabled firewalld.service
so now that is broken... ugh, I guess I need to decide which thing I need more.


All times are GMT -5. The time now is 07:03 AM.