mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-26 18:41:52 -08:00
fix: show nu as shell on Windows
relates to https://github.com/nushell/nushell/issues/2703
This commit is contained in:
parent
e798ad0623
commit
898a8f44e1
|
@ -178,6 +178,13 @@ func (env *environment) getShellName() string {
|
|||
if err != nil {
|
||||
return "unknown"
|
||||
}
|
||||
if name == "cmd.exe" {
|
||||
p, _ = p.Parent()
|
||||
name, err = p.Name()
|
||||
}
|
||||
if err != nil {
|
||||
return "unknown"
|
||||
}
|
||||
shell := strings.Replace(name, ".exe", "", 1)
|
||||
return strings.Trim(shell, " ")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue