mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
8d8d06d4c8
commit
b2e1b041e3
|
@ -180,11 +180,12 @@ func Init(env platform.Environment) string {
|
||||||
case PWSH, PWSH5:
|
case PWSH, PWSH5:
|
||||||
command = "(@(& %s init %s --config=%s --print%s) -join \"`n\") | Invoke-Expression"
|
command = "(@(& %s init %s --config=%s --print%s) -join \"`n\") | Invoke-Expression"
|
||||||
config = quotePwshStr(env.Flags().Config)
|
config = quotePwshStr(env.Flags().Config)
|
||||||
|
executable = quotePwshStr(executable)
|
||||||
case ELVISH:
|
case ELVISH:
|
||||||
command = "eval (%s init %s --config=%s --print%s | slurp)"
|
command = "eval (%s init %s --config=%s --print%s | slurp)"
|
||||||
config = quotePosixStr(env.Flags().Config)
|
config = env.Flags().Config
|
||||||
}
|
}
|
||||||
return fmt.Sprintf(command, quotePwshStr(executable), shell, config, additionalParams)
|
return fmt.Sprintf(command, executable, shell, config, additionalParams)
|
||||||
case ZSH, BASH, FISH, CMD, TCSH, XONSH:
|
case ZSH, BASH, FISH, CMD, TCSH, XONSH:
|
||||||
return PrintInit(env)
|
return PrintInit(env)
|
||||||
case NU:
|
case NU:
|
||||||
|
@ -246,12 +247,8 @@ func PrintInit(env platform.Environment) string {
|
||||||
configFile = quotePosixStr(configFile)
|
configFile = quotePosixStr(configFile)
|
||||||
script = tcshInit
|
script = tcshInit
|
||||||
case ELVISH:
|
case ELVISH:
|
||||||
executable = quotePosixStr(executable)
|
|
||||||
configFile = quotePosixStr(configFile)
|
|
||||||
script = elvishInit
|
script = elvishInit
|
||||||
case XONSH:
|
case XONSH:
|
||||||
executable = quotePosixStr(executable)
|
|
||||||
configFile = quotePosixStr(configFile)
|
|
||||||
script = xonshInit
|
script = xonshInit
|
||||||
default:
|
default:
|
||||||
return fmt.Sprintf("echo \"No initialization script available for %s\"", shell)
|
return fmt.Sprintf("echo \"No initialization script available for %s\"", shell)
|
||||||
|
|
Loading…
Reference in a new issue