Comment 0 for bug 1614253

Revision history for this message
Dmitry Lapshin (lapshin-dv) wrote : Fails to complete directories of parent of symbolic link to another filesystem

I have found strange fault of bash completion for cd builtin.
It's best described with an example.
Let's just think I have second drive mounted on /mnt

$ mkdir /tmp/bug && cd /tmp/bug
$ mkdir 1
$ ln -s link-1 1
$ ln -s link-fs /mnt
$ ls -l # To see contents
drwxrwxrwx ... 1
lrwxrwxrwx ... link-1 -> 1
lrwxrwxrwx ... link-fs -> /mnt
$ cd 1
$ cd ../[TAB TAB] # Works fine
1/ link-1/ link-fs/
$ cd ../link-1
$ cd ../[TAB TAB] # Works fine too
1/ link-1/ link-fs/
$ cd ../link-fs
$ cd ../[TAB TAB] # !! Ooups, nothing !!
$ ls ../[TAB TAB] # But hey, that works!
1/ link-1/ link-fs/
$ cd ../[TAB TAB] # That works fine too
bin/ boot/ ...
$ cd ../

This behaviour looks very strange for me, and I don't know, is that behaviour triggered by bash-completion or by bash itself, but that's definetly a small, but annoying bug.

Running 16.04.1 (xenial), bash is 4.3-14ubuntu1.1, bash-completion is 1:2.1-4.2ubuntu1.1