oh-my-posh/src/segment_julia.go

30 lines
643 B
Go
Raw Normal View History

2020-11-14 11:04:04 -08:00
package main
type julia struct {
language *language
}
func (j *julia) string() string {
return j.language.string()
}
func (j *julia) init(props *properties, env environmentInfo) {
j.language = &language{
2021-02-03 10:11:32 -08:00
env: env,
props: props,
extensions: []string{"*.jl"},
commands: []*cmd{
{
executable: "julia",
args: []string{"--version"},
2021-05-14 04:43:55 -07:00
regex: `julia version (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
2021-02-03 10:11:32 -08:00
},
},
2021-05-14 04:43:55 -07:00
versionURLTemplate: "[%s](https://github.com/JuliaLang/julia/releases/tag/v%s.%s.%s)",
2020-11-14 11:04:04 -08:00
}
}
func (j *julia) enabled() bool {
return j.language.enabled()
}