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

P9K_SSH not set when SSH into WSL #2709

Open
JosefUtbult opened this issue Jun 19, 2024 · 1 comment
Open

P9K_SSH not set when SSH into WSL #2709

JosefUtbult opened this issue Jun 19, 2024 · 1 comment

Comments

@JosefUtbult
Copy link

Hi. I was working with a Windows machine that I accessed over SSH, and I realized that the hostname wasn't showing up in the commandline as it should. This seems to be caused by the P9K_SSH flag not being set to 1 for SSH in WSL. I did a quickfix in my zshrc file that looks like this

if [[ "$(cmd.exe /c 'echo %SSH_CLIENT%' 2>/dev/null | sed $'s/\r//' | grep ' 22$')" ]]; then
  export P9K_SSH=1
fi

It pretty much runs cmd and checks if the SSH_CLIENT flag is set for Windows, and if that is the case just sets P9K_SSH manually.

I couldn't figure out where that flag is set by P10K, otherwise I would have solved it and made a pull request. Hope this was at least a bit relevant

@JosefUtbult
Copy link
Author

I seem to have figured it out

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

No branches or pull requests

1 participant