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

Docs assume PowerShell is running on Windows #252

Closed
2 tasks done
TylerLeonhardt opened this issue Dec 21, 2020 · 5 comments
Closed
2 tasks done

Docs assume PowerShell is running on Windows #252

TylerLeonhardt opened this issue Dec 21, 2020 · 5 comments
Labels
🤩 enhancement Improvement of a feature

Comments

@TylerLeonhardt
Copy link

Prerequisites

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

Description

Look at the "replace prompt" section:
https://ohmyposh.dev/docs/installation#4-replace-your-existing-prompt

$startInfo.FileName = "C:\tools\oh-my-posh.exe"
$cleanPWD = $PWD.ProviderPath.TrimEnd("\")
$startInfo.Arguments = "-config=""$env:USERPROFILE\.poshthemes\jandedobbeleer.omp.json"" -error=$errorCode -pwd=""$cleanPWD"" -execution-time=$executionTime"

There are several assumptions that this is being run on Windows.

When I first ran this on macOS, it silently failed and gave me the PS> prompt.

Environment

  • Oh my Posh version: N/A
  • Theme: N/A
  • Operating System: macOS
  • Shell: PowerShell
  • Terminal: iTerm2

Steps to Reproduce

  1. Install oh-my-posh3 with homebrew
  2. Run script in https://ohmyposh.dev/docs/installation#4-replace-your-existing-prompt

Expected behavior: Need a tab for "PowerShell on non-Windows" or something like that

Actual behavior: None exists

@JanDeDobbeleer
Copy link
Owner

Yes, that's correct. Unfortunately I can't nest the tabs, however, I can offer the same function the Module has, making this work regardless. Unix style paths work on Windows for Powershell so that shouldn't be an issue. Although it does make me wonder why one wouldn't opt for the model in that case.

@JanDeDobbeleer JanDeDobbeleer added the 🤩 enhancement Improvement of a feature label Dec 21, 2020
@tradiff
Copy link
Contributor

tradiff commented Dec 21, 2020

@JanDeDobbeleer just my own experience, when I found this project, I went to the docs and looked for "Installation", which led me here and had me do a manual installation. It wasn't until much later that I realized this module can also be installed much more simply from the PowerShell Gallery as described here.

Just an idea, maybe the installation docs for PowerShell should steer the user to the Install-Module route first. I'm not sure if that fixes the macOS user story. To be honest, I've never installed using the PowerShell Gallery :D

@JanDeDobbeleer
Copy link
Owner

JanDeDobbeleer commented Dec 21, 2020

@travistx a high level info block could do the trick. I'll do the platform agnostic changes and add that for completeness. I get the feeling you're not the only ones.

@TylerLeonhardt
Copy link
Author

@JanDeDobbeleer something worth considering is doing what starship does and bundle the init script into the product so that the scripts are a bit more friendly to look at.

JanDeDobbeleer added a commit that referenced this issue Dec 22, 2020
@JanDeDobbeleer
Copy link
Owner

JanDeDobbeleer commented Dec 22, 2020

@TylerLeonhardt the first working version is drafted, I'm going to add the other init scripts as well (and probably refactor the hell out of this). Should land somewhere this week.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤩 enhancement Improvement of a feature
Projects
None yet
Development

No branches or pull requests

3 participants