WSL icon indicating copy to clipboard operation
WSL copied to clipboard

tab completion always adds trailing slash

Open cvelten opened this issue 10 years ago • 4 comments

When using the tab completion feature, it appears that the console always adds in a trailing slash, not just with directories, which leads to e.g. python not being able to read a file.

Consider this:

 $ ls listfiles.py -la
-rwxrwxrwx 1 root root 1565 Jul  1 09:54 listfiles.py
 $ python listfiles.py/
python: can't open file 'listfiles.py/': [Errno 20] Not a directory
 $ python listfiles.py
usage: listfiles.py [-h] [--dir DIR] [-Q] [-B] [-X] path
listfiles.py: error: too few arguments

I have experienced that issue not just with python, but also with root, cat, and others. I have no running Linux machine available right now so I can't assert the bug better.

I am running on the Release Preview ring (14393.82), so it might already be fixed in the fast ring. However, I didn't find any issues posted here.

If you manually remove the slash it does obviously work, but it is of somewhat inconvenience.

Cheers

cvelten avatar Aug 21 '16 15:08 cvelten

Interesting -- that doesn't reproduce for me. Using tab-complete to select the name:

$ ls -l listfiles.py
-rwxrwxrwx 1 root root 14 Aug 21 11:30 listfiles.py
$ python listfiles.py
files
$

This machine is currently running 14393.10.

aseering avatar Aug 21 '16 15:08 aseering

I saw that sometimes when following a symlink from VolFS to DrvFS. Perhaps something like that happened?

rodrymbo avatar Aug 21 '16 16:08 rodrymbo

I saw that sometimes when following a symlink from VolFS to DrvFS. Perhaps something like that happened?

I just checked it from the $HOME dir and it looks like that's correct (checked both for root and the user). It also doesn't occur when going to the previously symlinked dir the normal way.

From that I assume this falls in line with #647 and #650 ? May be closed / referenced then.

cvelten avatar Aug 21 '16 21:08 cvelten

Closing this as a duplicate of #647 and #650.

benhillis avatar Jan 06 '17 16:01 benhillis