1

I'm working with Bash 4.2.46 on RHEL7 with the bash-completion packages installed, but I seem to have found an odd corner case where tab completion doesn't seem to work as expected.

I have a set of sub-directories, with one of them symlinked, similar to this:

bash$ ls -l my_dir
drwxr-xr-x 4 ten5 ten5 233 Jun 19  2015 admin-tools
drwxrwxr-x 4 ten5 ten5 213 Aug 24 16:10 dhcpd-config
lrwxrwxrwx 1 ten5 ten5  22 Jun 16  2015 develop -> ../nfs/ten5/develop

If I

cd ./mydir/develop

my expectation is that I should be able to perform commands based on my current working directory, which should be /home/ten5/my_dir/develop.

But commands like

ls ../d (tab)  
cd ../adm (tab)  

Don't work at all on this version. From what I can gather, it seems to be following the symlink and referencing the link target as the current working directory. They do work as expected on Bash 4.1.2 on RHEL6 and Bash 3.2.25 on RHEL5, so I'm trying to figure out what's been changed.

This may be related to Tab-completion within for loops not working

  • 1
    FWIW, works as expected in 4.3.42. – muru Jan 28 '16 at 18:03
  • 1
    @muru what OS was this on? – Thomas N Jan 28 '16 at 20:06
  • 1
    ...and I now concede that I apparently have some dorked-up installs, somehow. I've been able to confirm that this works as expected on another RHEL7 machine in my environment. – Thomas N Jan 28 '16 at 20:30
  • Ubuntu 14.04 and Arch Linux, both updated. – muru Jan 28 '16 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.