mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-31 22:07:25 -08:00
fix(millis): do not create env
This commit is contained in:
parent
98529e4a79
commit
289ca41709
|
@ -38,6 +38,12 @@ This command is used to get the value of the following variables:
|
||||||
_ = cmd.Help()
|
_ = cmd.Help()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if args[0] == "millis" {
|
||||||
|
fmt.Print(time.Now().UnixNano() / 1000000)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
env := &platform.Shell{
|
env := &platform.Shell{
|
||||||
CmdFlags: &platform.Flags{
|
CmdFlags: &platform.Flags{
|
||||||
Shell: shellName,
|
Shell: shellName,
|
||||||
|
@ -46,9 +52,8 @@ This command is used to get the value of the following variables:
|
||||||
}
|
}
|
||||||
env.Init()
|
env.Init()
|
||||||
defer env.Close()
|
defer env.Close()
|
||||||
|
|
||||||
switch args[0] {
|
switch args[0] {
|
||||||
case "millis":
|
|
||||||
fmt.Print(time.Now().UnixNano() / 1000000)
|
|
||||||
case "shell":
|
case "shell":
|
||||||
fmt.Println(env.Shell())
|
fmt.Println(env.Shell())
|
||||||
case "accent":
|
case "accent":
|
||||||
|
|
Loading…
Reference in a new issue