$ tree -p
.
├── [-rwxrwxr-x] out_bin
├── [-rw-rw-r--] out_not_bin
├── [drwxrwxr-x] out_of_recursion
└── [drwxrwxr-x] recursion
├── [-rwxrwxr-x] bin
├── [lrwxrwxrwx] in -> ../recursion/
├── [-rw-rw-r--] not_bin
└── [drwxrwxr-x] without
4 directories, 4 files
let's go into recursion dir
$ cd recursion/
$ pwd -L && pwd -P
/home/rrakus/tmp/symlink-test/recursion
/home/rrakus/tmp/symlink-test/recursion
try to tab-complete commands - [TAB] means hitting the tab twice
$ ../[TAB]
out_bin out_of_recursion/ recursion/
$ ./
bin in/ without/
So far, everything is ok. Now go into dir in, which is symlink to
../recursion/ - current dir
$ cd in/
$ pwd -L && pwd -P
/home/rrakus/tmp/symlink-test/recursion/in
/home/rrakus/tmp/symlink-test/recursion
And now try the tab-completion as above
$ ../[TAB] <--- bug here?
$ ./[TAB]
bin in/ without/
Is that bug? Or expected behaviour?
../out_bin will correctly run that binary
$ ../out_bin
HELLO
$ cat ../out_bin
echo HELLO
However try to complete file names
$ cat ../[TAB]
bin in/ not_bin without/
Trying glob completion works
$ ../*[TAB]
../out_bin ../out_of_recursion ../recursion
However, simple file completion uses logical dir struct, but glob
completion physical
$ pwd -L && pwd -P
/home/rrakus/tmp/symlink-test/recursion/in
/home/rrakus/tmp/symlink-test/recursion
$ ls ../[TAB]
bin in/ not_bin without/
$ ls ../*
out_bin out_not_bin out_of_recursion recursion
set -P will turn everything to consistent state, however is the above
considered as expected behaviour or is that a bug?
RR