-
Notifications
You must be signed in to change notification settings - Fork 852
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
[WSL2] Slow completion due to Windows PATH being appended to Linux PATH #4234
Comments
https://devblogs.microsoft.com/commandline/automatically-configuring-wsl/ /etc/wsl.conf
|
@benhillis Fantastic, thank you 👍 This blog post is gold, but very much hidden due to more recent articles on the blog. For other users who may run into similar issues, please check |
I removed the path (and restarted the wsl2 distro) but my tab-completion is still quite slow at times. Here is a screencast of when it was still slow: https://recordit.co/VOIfPE6ihy I think something is not working properly. |
If you use
It then hides It'd be nice to still have access to those somehow, while not incurring the penalty of scanning through windows related paths (directories like |
pathdirs seems to be the cause, https://stackoverflow.com/questions/76746392/why-is-my-zsh-tab-completion-slow-on-commands-but-not-directories The alternative is to drop windows PATH, but this is useful for clip.exe microsoft/WSL#4234
Version 10.0.18922.1000
The
PATH
environment variable contains both the Linux path and the Windows PATH in a single variable. On my machine, this makes PATH traversal extremely slow. The problem is very obvious when using auto-completion (type an incomplete command and press <TAB>).The
AppendNtPath
registry value suggested here, which disables this behavior on WSL1, does not work on WSL2.There should be a way to disable this automatic appending of the Windows PATH.
The text was updated successfully, but these errors were encountered: