You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Specific helper to get the path to oh-my-posh executable for cache clearing (since it has a built-in cache clear command instead of a file-based cache)
# Invoke oh-my-posh with explicit UTF-8 stdio and explicit arguments so prompt rendering
157
239
# never depends on opaque internal init/cache state.
158
240
functionInvoke-OhMyPoshCommand {
@@ -216,7 +298,7 @@ function Invoke-OhMyPoshCommand {
216
298
}
217
299
}
218
300
219
-
# Gather context for oh-my-posh prompt rendering, including error code, execution time, stack count, terminal width, and non-filesystem working directory.
301
+
# Gather context for oh-my-posh prompt rendering, including error code, execution time, stack count, terminal width, and non-filesystem working directory.
220
302
# This is used to provide consistent context to oh-my-posh for prompt rendering without relying on opaque internal state or caches.
221
303
functionGet-OhMyPoshPromptContext {
222
304
param(
@@ -305,12 +387,12 @@ function Get-OhMyPoshPromptContext {
305
387
return [PSCustomObject]$context
306
388
}
307
389
308
-
# Get the prompt text from oh-my-posh by invoking the executable with explicit arguments and context.
390
+
# Get the prompt text from oh-my-posh by invoking the executable with explicit arguments and context.
309
391
# This avoids relying on opaque internal state or caches for prompt rendering, and allows consistent prompts even in non-interactive contexts (like SSH or CI) where init scripts may not run.
The terminal restarts automatically when setup finishes (new tab in Windows Terminal, or new window otherwise). For the best experience use [PowerShell 7](https://github.com/PowerShell/PowerShell).
28
28
29
+
> **Recommended for Oh My Posh:** Install the x64 MSI release manually instead of relying on `winget`/Store (`WindowsApps`/MSIX). This repo preserves a direct MSI install and avoids the WindowsApps path when possible.
30
+
31
+
If Oh My Posh is already installed directly via MSI, setup preserves that install instead of forcing it back through the WindowsApps/MSIX path.
32
+
29
33
### Manual Setup
30
34
31
35
```powershell
@@ -53,7 +57,7 @@ When running locally you can override terminal defaults (not available via `irm
53
57
```powershell
54
58
Update-Profile # Sync profile, theme, caches, and Windows Terminal settings
55
59
Update-PowerShell # Check for new PowerShell 7 releases
56
-
Update-Tools # Update all managed tools (Oh My Posh, eza, zoxide, fzf, bat, ripgrep)
60
+
Update-Tools # Update winget-managed tools; direct/MSI Oh My Posh installs are preserved
57
61
```
58
62
59
63
`Update-Profile` requires hash verification by default. Confirm with `-ExpectedSha256 '<hash>'`, or use `-SkipHashCheck` to bypass. Use `-Force` to re-apply settings even when nothing changed upstream.
@@ -108,7 +112,7 @@ Run `Show-Help` in your terminal for a colored version of this list.
108
112
|`Edit-Profile` / `ep`| Open profile in preferred editor |
109
113
|`Update-Profile`| Sync profile, theme, caches, and WT settings |
110
114
|`Update-PowerShell`| Check for new PowerShell 7 releases |
111
-
|`Update-Tools`| Update Oh My Posh, eza, zoxide, fzf, bat, and ripgrep|
115
+
|`Update-Tools`| Update winget-managed tools; direct/MSI Oh My Posh installs are preserved|
112
116
|`reload`| Reload the PowerShell profile |
113
117
|`Show-Help`| Show help in terminal |
114
118
|`Uninstall-Profile`| Remove profile, caches, and WT changes (`-All` for everything) |
0 commit comments