mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -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 {
|
if err != nil {
|
||||||
return "unknown"
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
if name == "cmd.exe" {
|
||||||
|
p, _ = p.Parent()
|
||||||
|
name, err = p.Name()
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return "unknown"
|
||||||
|
}
|
||||||
shell := strings.Replace(name, ".exe", "", 1)
|
shell := strings.Replace(name, ".exe", "", 1)
|
||||||
return strings.Trim(shell, " ")
|
return strings.Trim(shell, " ")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue