Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab completion includes files in the windows system32 folder #2461

Closed
arjunv opened this issue Aug 30, 2017 · 8 comments
Closed

Tab completion includes files in the windows system32 folder #2461

arjunv opened this issue Aug 30, 2017 · 8 comments
Labels

Comments

@arjunv
Copy link

arjunv commented Aug 30, 2017

  • Microsoft Windows [Version 10.0.15063]

  • Installed keybase package using this method

  • Tab completion returns files from the system32 folder as well as linux commands in bash and zsh

capture

@benhillis
Copy link
Member

benhillis commented Aug 30, 2017

@arjunv - This is expected behavior since your NT %PATH% is appended to your Linux $PATH environment variable. On 15063 you can disable this functionality by setting this registry key:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss]
"AppendNtPath"=dword:00000000

@arjunv
Copy link
Author

arjunv commented Aug 31, 2017 via email

@therealkenc
Copy link
Collaborator

So how do I get rid of the same?
Considering the fact that system32 folder contains 4000+ files, this

Per your screencap, they are mostly .dlls. I suspect you can get most of what you want with:

export FIGNORE=".dll:.DLL"

Or if you don't want system32 in the path to begin with edit the registry like Ben said. For now. That registry cruft really needs to go. Better still edit your .bashrc and set your PATH= to whatever suits, including system32, or not.

@arjunv
Copy link
Author

arjunv commented Aug 31, 2017

Actually I read and replied @benhillis reply from the notification email. For some reason Github had truncated it to one line.
capture
Editing the registry was the right way for me. But I still think that should be done by default though. This is not an easy thing for a novice to find since most search engines still gets confused when trying to return results for till now polar keywords like bash windows or linux windows. :)

@fpqc
Copy link

fpqc commented Aug 31, 2017

@benhillis Would be great to include this in wslconfig as a global setting or for the distro distributors to be able to set it in their configurations on a per-distro basis.

@benhillis
Copy link
Member

@fpqc - This work is on the backlog.

@fpqc
Copy link

fpqc commented Aug 31, 2017

Aye aye sir!

@ghost
Copy link

ghost commented Sep 5, 2017

Editing the registry was the right way for me. But I still think that should be done by default
though. This is not an easy thing for a novice to find since most search engines still gets
confused when trying to return results for till now polar keywords like bash windows or linux
windows. :)

The github issues, even the ones that are already closed/resolved, work a bit as temporary placeholder for new helpful wiki content. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants