mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(pwsh): allow powershell 5 init
This commit is contained in:
parent
7fae781fff
commit
06258dc256
|
@ -288,8 +288,8 @@ func initShell(shell, configFile string) string {
|
||||||
return noExe
|
return noExe
|
||||||
}
|
}
|
||||||
switch shell {
|
switch shell {
|
||||||
case pwsh:
|
case pwsh, powershell5:
|
||||||
return fmt.Sprintf("(@(&\"%s\" --print-init --shell=pwsh --config=\"%s\") -join \"`n\") | Invoke-Expression", executable, configFile)
|
return fmt.Sprintf("(@(&\"%s\" --print-init --shell=%s --config=\"%s\") -join \"`n\") | Invoke-Expression", executable, shell, configFile)
|
||||||
case zsh, bash, fish, winCMD:
|
case zsh, bash, fish, winCMD:
|
||||||
return printShellInit(shell, configFile)
|
return printShellInit(shell, configFile)
|
||||||
default:
|
default:
|
||||||
|
@ -303,7 +303,7 @@ func printShellInit(shell, configFile string) string {
|
||||||
return noExe
|
return noExe
|
||||||
}
|
}
|
||||||
switch shell {
|
switch shell {
|
||||||
case pwsh:
|
case pwsh, powershell5:
|
||||||
return getShellInitScript(executable, configFile, pwshInit)
|
return getShellInitScript(executable, configFile, pwshInit)
|
||||||
case zsh:
|
case zsh:
|
||||||
return getShellInitScript(executable, configFile, zshInit)
|
return getShellInitScript(executable, configFile, zshInit)
|
||||||
|
|
Loading…
Reference in a new issue