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:
|
||||
command = "(@(& %s init %s --config=%s --print%s) -join \"`n\") | Invoke-Expression"
|
||||
config = quotePwshStr(env.Flags().Config)
|
||||
executable = quotePwshStr(executable)
|
||||
case ELVISH:
|
||||
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:
|
||||
return PrintInit(env)
|
||||
case NU:
|
||||
|
@ -246,12 +247,8 @@ func PrintInit(env platform.Environment) string {
|
|||
configFile = quotePosixStr(configFile)
|
||||
script = tcshInit
|
||||
case ELVISH:
|
||||
executable = quotePosixStr(executable)
|
||||
configFile = quotePosixStr(configFile)
|
||||
script = elvishInit
|
||||
case XONSH:
|
||||
executable = quotePosixStr(executable)
|
||||
configFile = quotePosixStr(configFile)
|
||||
script = xonshInit
|
||||
default:
|
||||
return fmt.Sprintf("echo \"No initialization script available for %s\"", shell)
|
||||
|
|
Loading…
Reference in a new issue