mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-09-20 21:47:31 -07:00
fix(pwsh): delegate manual flag on init
This commit is contained in:
parent
02d4e84e4a
commit
55ed6c9f58
|
@ -155,10 +155,15 @@ func Init(env environment.Environment) string {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return noExe
|
return noExe
|
||||||
}
|
}
|
||||||
|
var additionalParams string
|
||||||
if env.Flags().Strict {
|
if env.Flags().Strict {
|
||||||
return fmt.Sprintf("(@(& %s init %s --config=%s --print --strict) -join \"`n\") | Invoke-Expression", quotePwshStr(executable), shell, quotePwshStr(env.Flags().Config))
|
additionalParams += " --strict"
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("(@(& %s init %s --config=%s --print) -join \"`n\") | Invoke-Expression", quotePwshStr(executable), shell, quotePwshStr(env.Flags().Config))
|
if env.Flags().Manual {
|
||||||
|
additionalParams += " --manual"
|
||||||
|
}
|
||||||
|
command := "(@(& %s init %s --config=%s --print%s) -join \"`n\") | Invoke-Expression"
|
||||||
|
return fmt.Sprintf(command, quotePwshStr(executable), shell, quotePwshStr(env.Flags().Config), additionalParams)
|
||||||
case ZSH, BASH, FISH, CMD:
|
case ZSH, BASH, FISH, CMD:
|
||||||
return PrintInit(env)
|
return PrintInit(env)
|
||||||
case NU:
|
case NU:
|
||||||
|
|
Loading…
Reference in a new issue