mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-27 20:09:39 -08:00
parent
30bccb06d2
commit
4a16c3fc6c
|
@ -21,7 +21,7 @@ Export-PoshTheme -FilePath ~/.mytheme.omp.json -Format json
|
|||
Once you're done editing, adjust your `$PROFILE` to use your newly created theme.
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (oh-my-posh --init --shell pwsh --config ~/.mytheme.omp.json)
|
||||
oh-my-posh --init --shell pwsh --config ~/.mytheme.omp.json | Invoke-Expression
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
|
|
@ -26,7 +26,7 @@ oh-my-posh --print-shell
|
|||
Edit `$PROFILE` in your preferred PowerShell version and add the following line.
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (oh-my-posh --init --shell pwsh --config ~/.mytheme.omp.json)
|
||||
oh-my-posh --init --shell pwsh --config ~/.mytheme.omp.json | Invoke-Expression
|
||||
```
|
||||
|
||||
Once added, reload your profile for the changes to take effect.
|
||||
|
|
|
@ -66,7 +66,7 @@ function Set-PoshPrompt {
|
|||
$global:omp_global_sessionstate = $PSCmdlet.SessionState
|
||||
|
||||
$poshCommand = Get-PoshCommand
|
||||
Invoke-Expression (& $poshCommand --init --shell=pwsh --config="$config")
|
||||
(& $poshCommand --init --shell=pwsh --config="$config") | Invoke-Expression
|
||||
}
|
||||
|
||||
function Get-PoshThemes {
|
||||
|
|
|
@ -223,7 +223,7 @@ func initShell(shell, configFile string) string {
|
|||
}
|
||||
switch shell {
|
||||
case pwsh:
|
||||
return fmt.Sprintf("Invoke-Expression (@(&\"%s\" --print-init --shell=pwsh --config=\"%s\") -join \"`n\")", executable, configFile)
|
||||
return fmt.Sprintf("(@(&\"%s\" --print-init --shell=pwsh --config=\"%s\") -join \"`n\") | Invoke-Expression", executable, configFile)
|
||||
case zsh, bash, fish:
|
||||
return printShellInit(shell, configFile)
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue