-
Notifications
You must be signed in to change notification settings - Fork 15
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
Completion not working for default shells other than bash #26
Comments
Your expectation is correct. That should work and works for me. Has this ever worked for you (so a regression)? Or is this the first time you're trying? Could you attempt to
|
I just installed the module and it didn't work out of the box.
I'm using |
Thanks. Different distros are typically what complicates things. I recently updated the README to indicate the Based on the Install Date and Install Reason for the Have you tried argument completion again since installing that package? With the |
Actually I think my system time is messed up. I install However, by running your command, everything works fine:
I am currently trying completion with |
I somehow managed to get
|
Nope, even with |
|
Ok. Based on your original output from
Let me know how it goes. The fact that you were able to autocomplete when If there is something I should capture in the README to better support z shell, I would like to figure out what that is and add it. |
Doesn't look too good:
I always tried these with a new instance of pwsh. Profile is completely empyt too. |
https://pastebin.com/W3f3xdum |
I guess you retrieve the completion function using
( When I only run the very first wsl command, it works how (I guess) it is supposed to:
|
Both |
Can you run through my steps exactly as I shared them? You should restart PowerShell after clearing the APPDATA cache. Then you also need to attempt autocompletion before calling |
|
I don't see you attempting to |
Oh sorry, my bad. Now the fun begins: I tried this with
However, with
|
This is because
|
Ok. Thanks. So sounds like at least bash is working as expected now. So Is there a different way to source this file for z shell so |
Suggestion:
For example:
|
I don't really know how sourcing a |
I can try that.
Can you confirm here that you were using z shell when you set I want to make sure that, assuming |
Sorry for not answering your question. In the retried the test you mentioned with z shell and even with
I guess there is a second command that converts the |
Thanks. It not working is what I would have expected given the dot sourcing issue, which is why I was surprised that it might have worked for you looking back at the history of the repros. Calling bash explicitly both when identifying completion functions and generating completions is the right approach. Now I'm just battling with WSL not accepting the completion generation command when I switch to |
@scrouthtv could you try your repro again with the latest code?
Everything works for me now with zsh set as my default shell. |
Yep works for me now, too. Thanks for your quick help! |
Awesome. 0.2.3 was published with the fix. Thanks for reporting this. |
If I'm not mistaken, the readme claims that by importing a wsl command both command and argument completion is enabled automatically for pwsh as well:
To Reproduce
Steps to reproduce the behavior:
pwsh
:wsl
that has completion enabled inwsl bash
:wsl
command(s) intopwsh
:Expected behavior
Tabbing on those commands in
pwsh
would provide me with the same completion commands as inbash
.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: