[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Inconsistency of physical / logical directory structure and tab completi

From: Roman Rakus
Subject: Inconsistency of physical / logical directory structure and tab completion
Date: Wed, 10 Nov 2010 17:25:58 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100921 Fedora/3.1.4-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.4

 $ 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

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

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
$ 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

$ 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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]