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

ZSH init in WSL fails if path to OMP includes whitespace #879

Closed
2 tasks done
jonaskuske opened this issue Aug 2, 2021 · 2 comments
Closed
2 tasks done

ZSH init in WSL fails if path to OMP includes whitespace #879

jonaskuske opened this issue Aug 2, 2021 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@jonaskuske
Copy link

Prerequisites

  • I have read and understood the CONTRIBUTING guide
  • I have looked for duplicate issues before submitting this one

Description

If the path to the OMP binary contains a space, the generated ZSH init script (for use in WSL) breaks because the OMP path isn't quoted/escaped. I currently need to init like this:

eval "$(oh-my-posh-wsl --init --shell zsh --config /the/path.json | sed -e 's/Jonas Kuske/JONASK~1/')"

Environment

  • Oh My Posh version: 3.171.0
  • Theme: Agnoster Plus
  • Operating System: Ubuntu via WSL2
  • Shell: ZSH
  • Terminal: Windows Terminal

Steps to Reproduce

  1. Install oh-my-posh on Windows (in my case via winget)
  2. Have a whitespace as part of your ~ dir path
  3. Initialize oh-my-posh in WSL

Expected behavior: oh-my-posh initializes

Actual behavior:

_omp-precmd:8: no such file or directory: /c/Users/Jonas
@JanDeDobbeleer
Copy link
Owner

That can be fixed. I'll treat it as a bug.

@JanDeDobbeleer JanDeDobbeleer added the 🐛 bug Something isn't working label Aug 2, 2021
JanDeDobbeleer added a commit that referenced this issue Aug 9, 2021
Copy link

github-actions bot commented Apr 8, 2024

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues.
If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants