Repository: JanDeDobbeleer/oh-my-posh
Pull request #2616 (2022-08-05 06:08:29)

secondary prompts enable
### Prerequisites

- [x] I have read and understood the [contributing guide][CONTRIBUTING.md]
- [x] The commit message follows the [conventional commits][cc] guidelines
- [x] Tests for the changes have been added (for bug fixes/features)
- [x] Docs have been added/updated (for bug fixes/features)

### Description

- refactor(bash): use \001 and \002 as decoration wrapper
- feat: remove functions to enable prompt features

<!---

Tips:

If you're not comfortable with working with Git, we're working a guide (https://ohmyposh.dev/docs/contributing_git) to help you out.
Oh My Posh advises GitKraken (https://www.gitkraken.com/invite/nQmDPR9D) as your preferred cross platform Git GUI power tool.

-->

[CONTRIBUTING.md]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/CONTRIBUTING.md
[cc]: https://www.conventionalcommits.org/en/v1.0.0/#summary



Patch:
diff --git a/src/cli/cache.go b/src/cli/cache.go
index 07e48151..66851720 100644
--- a/src/cli/cache.go
+++ b/src/cli/cache.go
@@ -56,7 +56,7 @@ You can do the following:
 	},
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	rootCmd.AddCommand(getCache)
 }
 
diff --git a/src/cli/config.go b/src/cli/config.go
index e139ea99..3cfe386c 100644
--- a/src/cli/config.go
+++ b/src/cli/config.go
@@ -39,6 +39,6 @@ You can export, migrate or edit the config.`,
 	},
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	rootCmd.AddCommand(configCmd)
 }
diff --git a/src/cli/config_export.go b/src/cli/config_export.go
index d5ba6203..4a718548 100644
--- a/src/cli/config_export.go
+++ b/src/cli/config_export.go
@@ -73,7 +73,7 @@ func cleanOutputPath(path string, env environment.Environment) string {
 	return filepath.Clean(path)
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	exportCmd.Flags().StringVarP(&format, "format", "f", "json", "config format to migrate to")
 	exportCmd.Flags().StringVarP(&output, "output", "o", "", "config file to export to")
 	configCmd.AddCommand(exportCmd)
diff --git a/src/cli/config_export_image.go b/src/cli/config_export_image.go
index 22eb2a9b..bf588d95 100644
--- a/src/cli/config_export_image.go
+++ b/src/cli/config_export_image.go
@@ -97,7 +97,7 @@ Exports the config to an image file using customized output options.`,
 	},
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	imageCmd.Flags().StringVar(&author, "author", "", "config author")
 	imageCmd.Flags().StringVar(&bgColor, "background-color", "", "image background color")
 	imageCmd.Flags().IntVar(&cursorPadding, "cursor-padding", 0, "prompt cursor padding")
diff --git a/src/cli/debug.go b/src/cli/debug.go
index b575b9bf..640219ff 100644
--- a/src/cli/debug.go
+++ b/src/cli/debug.go
@@ -55,6 +55,6 @@ var debugCmd = &cobra.Command{
 	},
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	rootCmd.AddCommand(debugCmd)
 }
diff --git a/src/cli/font.go b/src/cli/font.go
index 240ebb8d..fd90418e 100644
--- a/src/cli/font.go
+++ b/src/cli/font.go
@@ -43,6 +43,6 @@ This command is used to install fonts and configure the font in your terminal.
 	}
 )
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	rootCmd.AddCommand(fontCmd)
 }
diff --git a/src/cli/get.go b/src/cli/get.go
index 28a95c59..473dcf33 100644
--- a/src/cli/get.go
+++ b/src/cli/get.go
@@ -56,6 +56,6 @@ This command is used to get the value of the following variables:
 	},
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	rootCmd.AddCommand(getCmd)
 }
diff --git a/src/cli/init.go b/src/cli/init.go
index 1ce3cc09..e598ee77 100644
--- a/src/cli/init.go
+++ b/src/cli/init.go
@@ -2,6 +2,7 @@ package cli
 
 import (
 	"fmt"
+	"oh-my-posh/engine"
 	"oh-my-posh/environment"
 	"oh-my-posh/shell"
 
@@ -38,7 +39,7 @@ See the documentation to initialize your shell: https://ohmyposh.dev/docs/instal
 	}
 )
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	initCmd.Flags().BoolVarP(&print, "print", "p", false, "print the init script")
 	initCmd.Flags().BoolVarP(&strict, "strict", "s", false, "run in strict mode")
 	_ = initCmd.MarkPersistentFlagRequired("config")
@@ -56,6 +57,10 @@ func runInit(shellName string) {
 	}
 	env.Init()
 	defer env.Close()
+	cfg := engine.LoadConfig(env)
+	shell.Transient = cfg.TransientPrompt != nil
+	shell.ErrorLine = cfg.ErrorLine != nil || cfg.ValidLine != nil
+	shell.Tooltips = len(cfg.Tooltips) > 0
 	if print {
 		init := shell.PrintInit(env)
 		fmt.Print(init)
diff --git a/src/cli/print.go b/src/cli/print.go
index 4714fede..7d08efde 100644
--- a/src/cli/print.go
+++ b/src/cli/print.go
@@ -116,7 +116,7 @@ var printCmd = &cobra.Command{
 	},
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	printCmd.Flags().StringVar(&pwd, "pwd", "", "current working directory")
 	printCmd.Flags().StringVar(&pswd, "pswd", "", "current working directory (according to pwsh)")
 	printCmd.Flags().StringVar(&shellName, "shell", "", "the shell to print for")
diff --git a/src/cli/prompt.go b/src/cli/prompt.go
index e39a03f0..12d3e712 100644
--- a/src/cli/prompt.go
+++ b/src/cli/prompt.go
@@ -15,7 +15,7 @@ var promptCmd = &cobra.Command{
 	},
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	// legacy support
 	promptCmd.AddCommand(initCmd)
 	promptCmd.AddCommand(debugCmd)
diff --git a/src/cli/root.go b/src/cli/root.go
index 1e9a390b..90b487be 100644
--- a/src/cli/root.go
+++ b/src/cli/root.go
@@ -48,7 +48,7 @@ var (
 	initialize bool
 )
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	rootCmd.PersistentFlags().StringVarP(&config, "config", "c", "", "config (required)")
 	rootCmd.Flags().BoolVarP(&initialize, "init", "i", false, "init (deprecated)")
 	rootCmd.Flags().BoolVar(&displayVersion, "version", false, "version")
diff --git a/src/cli/version.go b/src/cli/version.go
index 8e470cc4..0a5c9542 100644
--- a/src/cli/version.go
+++ b/src/cli/version.go
@@ -17,6 +17,6 @@ var versionCmd = &cobra.Command{
 	},
 }
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	rootCmd.AddCommand(versionCmd)
 }
diff --git a/src/color/ansi.go b/src/color/ansi.go
index 4d1c5af0..8bfee2ce 100644
--- a/src/color/ansi.go
+++ b/src/color/ansi.go
@@ -77,33 +77,33 @@ func (a *Ansi) Init(shellName string) {
 		a.dimmed = "%%{\x1b[2m%%}%s%%{\x1b[22m%%}"
 		a.strikethrough = "%%{\x1b[9m%%}%s%%{\x1b[29m%%}"
 	case shell.BASH:
-		a.format = "\\[%s\\]"
-		a.linechange = "\\[\x1b[%d%s\\]"
-		a.right = "\\[\x1b[%dC\\]"
-		a.left = "\\[\x1b[%dD\\]"
-		a.creset = "\\[\x1b[0m\\]"
-		a.clearBelow = "\\[\x1b[0J\\]"
-		a.clearLine = "\\[\x1b[K\\]"
-		a.saveCursorPosition = "\\[\x1b7\\]"
-		a.restoreCursorPosition = "\\[\x1b8\\]"
-		a.title = "\\[\x1b]0;%s\007\\]"
-		a.colorSingle = "\\[\x1b[%sm\\]%s\\[\x1b[0m\\]"
-		a.colorFull = "\\[\x1b[%sm\x1b[%sm\\]%s\\[\x1b[0m\\]"
-		a.colorTransparent = "\\[\x1b[%s;49m\x1b[7m\\]%s\\[\x1b[0m\\]"
-		a.escapeLeft = "\\["
-		a.escapeRight = "\\]"
-		a.hyperlink = "\\[\x1b]8;;%s\x1b\\\\\\]%s\\[\x1b]8;;\x1b\\\\\\]"
-		a.hyperlinkRegex = `(?P<STR>\\\[\x1b\]8;;(.+)\x1b\\\\\\\](?P<TEXT>.+)\\\[\x1b\]8;;\x1b\\\\\\\])`
-		a.osc99 = "\\[\x1b]9;9;\"%s\"\x1b\\\\\\]"
-		a.osc7 = "\\[\x1b]7;\"file://%s/%s\"\x1b\\\\\\]"
-		a.bold = "\\[\x1b[1m\\]%s\\[\x1b[22m\\]"
-		a.italic = "\\[\x1b[3m\\]%s\\[\x1b[23m\\]"
-		a.underline = "\\[\x1b[4m\\]%s\\[\x1b[24m\\]"
-		a.overline = "\\[\x1b[53m\\]%s\\[\x1b[55m\\]"
-		a.blink = "\\[\x1b[5m\\]%s\\[\x1b[25m\\]"
-		a.reverse = "\\[\x1b[7m\\]%s\\[\x1b[27m\\]"
-		a.dimmed = "\\[\x1b[2m\\]%s\\[\x1b[22m\\]"
-		a.strikethrough = "\\[\x1b[9m\\]%s\\[\x1b[29m\\]"
+		a.format = "\001%s\002"
+		a.linechange = "\001\x1b[%d%s\002"
+		a.right = "\001\x1b[%dC\002"
+		a.left = "\001\x1b[%dD\002"
+		a.creset = "\001\x1b[0m\002"
+		a.clearBelow = "\001\x1b[0J\002"
+		a.clearLine = "\001\x1b[K\002"
+		a.saveCursorPosition = "\001\x1b7\002"
+		a.restoreCursorPosition = "\001\x1b8\002"
+		a.title = "\001\x1b]0;%s\007\002"
+		a.colorSingle = "\001\x1b[%sm\002%s\001\x1b[0m\002"
+		a.colorFull = "\001\x1b[%sm\x1b[%sm\002%s\001\x1b[0m\002"
+		a.colorTransparent = "\001\x1b[%s;49m\x1b[7m\002%s\001\x1b[0m\002"
+		a.escapeLeft = "\001"
+		a.escapeRight = "\002"
+		a.hyperlink = "\001\x1b]8;;%s\x1b\\\\\002%s\001\x1b]8;;\x1b\\\\\002"
+		a.hyperlinkRegex = `(?P<STR>\001\x1b\]8;;(.+)\x1b\\\\\002(?P<TEXT>.+)\001\x1b\]8;;\x1b\\\\\002)`
+		a.osc99 = "\001\x1b]9;9;\"%s\"\x1b\\\\\002"
+		a.osc7 = "\001\x1b]7;\"file://%s/%s\"\x1b\\\\\002"
+		a.bold = "\001\x1b[1m\002%s\001\x1b[22m\002"
+		a.italic = "\001\x1b[3m\002%s\001\x1b[23m\002"
+		a.underline = "\001\x1b[4m\002%s\001\x1b[24m\002"
+		a.overline = "\001\x1b[53m\002%s\001\x1b[55m\002"
+		a.blink = "\001\x1b[5m\002%s\001\x1b[25m\002"
+		a.reverse = "\001\x1b[7m\002%s\001\x1b[27m\002"
+		a.dimmed = "\001\x1b[2m\002%s\001\x1b[22m\002"
+		a.strikethrough = "\001\x1b[9m\002%s\001\x1b[29m\002"
 	default:
 		a.format = "%s"
 		a.linechange = "\x1b[%d%s"
diff --git a/src/color/text.go b/src/color/text.go
index dacc8f0d..0dff8dae 100644
--- a/src/color/text.go
+++ b/src/color/text.go
@@ -7,7 +7,7 @@ import (
 	"github.com/mattn/go-runewidth"
 )
 
-func init() { // nolint:gochecknoinits
+func init() { //nolint:gochecknoinits
 	runewidth.DefaultCondition.EastAsianWidth = false
 }
 
diff --git a/src/engine/config.go b/src/engine/config.go
index aef61da4..e160e9ce 100644
--- a/src/engine/config.go
+++ b/src/engine/config.go
@@ -123,11 +123,6 @@ func loadConfig(env environment.Environment) *Config {
 	err = config.BindStruct("", &cfg)
 	cfg.exitWithError(err)
 
-	// initialize default values
-	if cfg.TransientPrompt == nil {
-		cfg.TransientPrompt = &Segment{}
-	}
-
 	return &cfg
 }
 
diff --git a/src/engine/engine.go b/src/engine/engine.go
index 177ace3c..8b11a63f 100644
--- a/src/engine/engine.go
+++ b/src/engine/engine.go
@@ -376,7 +376,7 @@ func (e *Engine) PrintExtraPrompt(promptType ExtraPromptType) string {
 		if len(template) != 0 {
 			return template
 		}
-		switch promptType { // nolint: exhaustive
+		switch promptType { //nolint: exhaustive
 		case Debug:
 			return "[DBG]: "
 		case Transient:
diff --git a/src/engine/migrate.go b/src/engine/migrate.go
index a8078b4f..c1a462c7 100644
--- a/src/engine/migrate.go
+++ b/src/engine/migrate.go
@@ -48,7 +48,7 @@ func (segment *Segment) migrationOne(env environment.Environment) {
 	// General properties that need replacement
 	segment.migratePropertyKey("display_version", properties.FetchVersion)
 	delete(segment.Properties, "enable_hyperlink")
-	switch segment.Type { // nolint:exhaustive
+	switch segment.Type { //nolint:exhaustive
 	case TEXT:
 		segment.migratePropertyKey("text", segmentTemplate)
 		segment.migrateTemplate()
diff --git a/src/environment/battery/battery_windows.go b/src/environment/battery/battery_windows.go
index 7c8cd373..976c7219 100644
--- a/src/environment/battery/battery_windows.go
+++ b/src/environment/battery/battery_windows.go
@@ -72,7 +72,7 @@ type guid struct {
 
 type spDeviceInterfaceData struct {
 	cbSize             uint32
-	InterfaceClassGuid guid // nolint:revive
+	InterfaceClassGuid guid //nolint:revive
 	Flags              uint32
 	Reserved           uint
 }
@@ -92,7 +92,7 @@ func uint32ToFloat64(num uint32) (float64, error) {
 }
 
 func setupDiSetup(proc *windows.LazyProc, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, error) {
-	r1, _, errno := syscall.Syscall6(proc.Addr(), nargs, a1, a2, a3, a4, a5, a6) // nolint:staticcheck
+	r1, _, errno := syscall.Syscall6(proc.Addr(), nargs, a1, a2, a3, a4, a5, a6) //nolint:staticcheck
 	if windows.Handle(r1) == windows.InvalidHandle {
 		if errno != 0 {
 			return 0, error(errno)
@@ -103,7 +103,7 @@ func setupDiSetup(proc *windows.LazyProc, nargs, a1, a2, a3, a4, a5, a6 uintptr)
 }
 
 func setupDiCall(proc *windows.LazyProc, nargs, a1, a2, a3, a4, a5, a6 uintptr) syscall.Errno {
-	r1, _, errno := syscall.Syscall6(proc.Addr(), nargs, a1, a2, a3, a4, a5, a6) // nolint:staticcheck
+	r1, _, errno := syscall.Syscall6(proc.Addr(), nargs, a1, a2, a3, a4, a5, a6) //nolint:staticcheck
 	if r1 == 0 {
 		if errno != 0 {
 			return errno
@@ -148,7 +148,7 @@ func systemGet(idx int) (*battery, error) {
 		return nil, err
 	}
 	defer func() {
-		_, _, _ = syscall.Syscall(setupDiDestroyDeviceInfoList.Addr(), 1, hdev, 0, 0) // nolint:staticcheck
+		_, _, _ = syscall.Syscall(setupDiDestroyDeviceInfoList.Addr(), 1, hdev, 0, 0) //nolint:staticcheck
 	}()
 
 	var did spDeviceInterfaceData
diff --git a/src/environment/shell_windows.go b/src/environment/shell_windows.go
index 12a634f0..3acf5b60 100644
--- a/src/environment/shell_windows.go
+++ b/src/environment/shell_windows.go
@@ -434,45 +434,45 @@ func (env *ShellEnvironment) parseNetworkInterface(network *WLAN_INTERFACE_INFO,
 	return &info, nil
 }
 
-type WLAN_INTERFACE_INFO_LIST struct { // nolint: revive
+type WLAN_INTERFACE_INFO_LIST struct { //nolint: revive
 	dwNumberOfItems uint32
-	dwIndex         uint32 // nolint: unused
+	dwIndex         uint32 //nolint: unused
 	InterfaceInfo   [1]WLAN_INTERFACE_INFO
 }
 
-type WLAN_INTERFACE_INFO struct { // nolint: revive
-	InterfaceGuid           syscall.GUID // nolint: revive
+type WLAN_INTERFACE_INFO struct { //nolint: revive
+	InterfaceGuid           syscall.GUID //nolint: revive
 	strInterfaceDescription [256]uint16
 	isState                 uint32
 }
 
-type WLAN_CONNECTION_ATTRIBUTES struct { // nolint: revive
-	isState                   uint32      // nolint: unused
-	wlanConnectionMode        uint32      // nolint: unused
-	strProfileName            [256]uint16 // nolint: unused
+type WLAN_CONNECTION_ATTRIBUTES struct { //nolint: revive
+	isState                   uint32      //nolint: unused
+	wlanConnectionMode        uint32      //nolint: unused
+	strProfileName            [256]uint16 //nolint: unused
 	wlanAssociationAttributes WLAN_ASSOCIATION_ATTRIBUTES
 	wlanSecurityAttributes    WLAN_SECURITY_ATTRIBUTES
 }
 
-type WLAN_ASSOCIATION_ATTRIBUTES struct { // nolint: revive
+type WLAN_ASSOCIATION_ATTRIBUTES struct { //nolint: revive
 	dot11Ssid         DOT11_SSID
 	dot11BssType      uint32
-	dot11Bssid        [6]uint8 // nolint: unused
+	dot11Bssid        [6]uint8 //nolint: unused
 	dot11PhyType      uint32
-	uDot11PhyIndex    uint32 // nolint: unused
+	uDot11PhyIndex    uint32 //nolint: unused
 	wlanSignalQuality uint32
 	ulRxRate          uint32
 	ulTxRate          uint32
 }
 
-type WLAN_SECURITY_ATTRIBUTES struct { // nolint: revive
+type WLAN_SECURITY_ATTRIBUTES struct { //nolint: revive
 	bSecurityEnabled     uint32
-	bOneXEnabled         uint32 // nolint: unused
+	bOneXEnabled         uint32 //nolint: unused
 	dot11AuthAlgorithm   uint32
 	dot11CipherAlgorithm uint32
 }
 
-type DOT11_SSID struct { // nolint: revive
+type DOT11_SSID struct { //nolint: revive
 	uSSIDLength uint32
 	ucSSID      [32]uint8
 }
diff --git a/src/environment/windows_win32.go b/src/environment/windows_win32.go
index 04cf809d..41acfbdf 100644
--- a/src/environment/windows_win32.go
+++ b/src/environment/windows_win32.go
@@ -112,7 +112,7 @@ func queryWindowTitles(processName, windowTitleRegex string) (string, error) {
 	return title, nil
 }
 
-type REPARSE_DATA_BUFFER struct { // nolint: revive
+type REPARSE_DATA_BUFFER struct { //nolint: revive
 	ReparseTag        uint32
 	ReparseDataLength uint16
 	Reserved          uint16
@@ -176,7 +176,7 @@ func readWinAppLink(path string) (string, error) {
 	if err != nil {
 		return "", err
 	}
-	defer syscall.CloseHandle(h) // nolint: errcheck
+	defer syscall.CloseHandle(h) //nolint: errcheck
 
 	rdbbuf := make([]byte, syscall.MAXIMUM_REPARSE_DATA_BUFFER_SIZE)
 	var bytesReturned uint32
diff --git a/src/font/install_windows.go b/src/font/install_windows.go
index 330d2dad..971646d7 100644
--- a/src/font/install_windows.go
+++ b/src/font/install_windows.go
@@ -15,8 +15,8 @@ import (
 var FontsDir = filepath.Join(os.Getenv("WINDIR"), "Fonts")
 
 const (
-	WM_FONTCHANGE  = 0x001D // nolint:revive
-	HWND_BROADCAST = 0xFFFF // nolint:revive
+	WM_FONTCHANGE  = 0x001D //nolint:revive
+	HWND_BROADCAST = 0xFFFF //nolint:revive
 )
 
 func install(font *Font) (err error) {
diff --git a/src/segments/brewfather.go b/src/segments/brewfather.go
index 7c096a9e..21b5332f 100644
--- a/src/segments/brewfather.go
+++ b/src/segments/brewfather.go
@@ -97,7 +97,7 @@ type Batch struct {
 }
 
 func (bf *Brewfather) Template() string {
-	return " {{ .StatusIcon }} {{ if .DaysBottledOrFermented }}{{ .DaysBottledOrFermented }}{{ .DayIcon }} {{ end }}{{ url .Recipe.Name .URL }} {{ printf \"%.1f\" .MeasuredAbv }}%{{ if and (.Reading) (eq .Status \"Fermenting\") }} {{ printf \"%.3f\" .Reading.Gravity }} {{ .Reading.Temperature }}\u00b0 {{ .TemperatureTrendIcon }}{{ end }} " // nolint:lll
+	return " {{ .StatusIcon }} {{ if .DaysBottledOrFermented }}{{ .DaysBottledOrFermented }}{{ .DayIcon }} {{ end }}{{ url .Recipe.Name .URL }} {{ printf \"%.1f\" .MeasuredAbv }}%{{ if and (.Reading) (eq .Status \"Fermenting\") }} {{ printf \"%.3f\" .Reading.Gravity }} {{ .Reading.Temperature }}\u00b0 {{ .TemperatureTrendIcon }}{{ end }} " //nolint:lll
 }
 
 func (bf *Brewfather) Enabled() bool {
diff --git a/src/segments/dotnet.go b/src/segments/dotnet.go
index ede36c00..37a4ea0b 100644
--- a/src/segments/dotnet.go
+++ b/src/segments/dotnet.go
@@ -29,7 +29,7 @@ func (d *Dotnet) Init(props properties.Properties, env environment.Environment)
 					`(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?))`,
 			},
 		},
-		versionURLTemplate: "https://github.com/dotnet/core/blob/master/release-notes/{{ .Major }}.{{ .Minor }}/{{ .Major }}.{{ .Minor }}.{{ substr 0 1 .Patch }}/{{ .Major }}.{{ .Minor }}.{{ substr 0 1 .Patch }}.md", // nolint: lll
+		versionURLTemplate: "https://github.com/dotnet/core/blob/master/release-notes/{{ .Major }}.{{ .Minor }}/{{ .Major }}.{{ .Minor }}.{{ substr 0 1 .Patch }}/{{ .Major }}.{{ .Minor }}.{{ substr 0 1 .Patch }}.md", //nolint: lll
 	}
 }
 
diff --git a/src/segments/git.go b/src/segments/git.go
index 3076a753..ed9bcf36 100644
--- a/src/segments/git.go
+++ b/src/segments/git.go
@@ -110,7 +110,7 @@ const (
 )
 
 func (g *Git) Template() string {
-	return " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} " // nolint: lll
+	return " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} " //nolint: lll
 }
 
 func (g *Git) Enabled() bool {
diff --git a/src/shell/init.go b/src/shell/init.go
index 3cf160ed..61fcd6af 100644
--- a/src/shell/init.go
+++ b/src/shell/init.go
@@ -3,6 +3,7 @@ package shell
 import (
 	_ "embed"
 	"path/filepath"
+	"strconv"
 
 	"fmt"
 	"oh-my-posh/environment"
@@ -33,6 +34,12 @@ const (
 	noExe = "echo \"Unable to find Oh My Posh executable\""
 )
 
+var (
+	Transient bool
+	ErrorLine bool
+	Tooltips  bool
+)
+
 func getExecutablePath(env environment.Environment) (string, error) {
 	executable, err := os.Executable()
 	if err != nil {
@@ -102,6 +109,9 @@ func PrintInit(env environment.Environment) string {
 func getShellInitScript(executable, configFile, script string) string {
 	script = strings.ReplaceAll(script, "::OMP::", executable)
 	script = strings.ReplaceAll(script, "::CONFIG::", configFile)
+	script = strings.ReplaceAll(script, "::TRANSIENT::", strconv.FormatBool(Transient))
+	script = strings.ReplaceAll(script, "::ERROR_LINE::", strconv.FormatBool(ErrorLine))
+	script = strings.ReplaceAll(script, "::TOOLTIPS::", strconv.FormatBool(Tooltips))
 	return script
 }
 
diff --git a/src/shell/scripts/omp.fish b/src/shell/scripts/omp.fish
index 34368a58..dd1886dd 100644
--- a/src/shell/scripts/omp.fish
+++ b/src/shell/scripts/omp.fish
@@ -64,7 +64,7 @@ function _render_tooltip
   commandline --function repaint
 end
 
-function enable_poshtooltips
+if test "::TOOLTIPS::" = "true"
   bind \x20 _render_tooltip
 end
 
@@ -76,6 +76,12 @@ function _render_transient
   commandline --function execute
 end
 
-function enable_poshtransientprompt
+if test "::TRANSIENT::" = "true"
   bind \r _render_transient
 end
+
+# legacy functions
+function enable_poshtooltips
+end
+function enable_poshtransientprompt
+end
diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1
index 4ed81a34..9d6f555b 100644
--- a/src/shell/scripts/omp.ps1
+++ b/src/shell/scripts/omp.ps1
@@ -100,7 +100,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
         }
     }
 
-    function Enable-PoshTooltips {
+    if ("::TOOLTIPS::" -eq "true") {
         Set-PSReadLineKeyHandler -Key SpaceBar -ScriptBlock {
             [Microsoft.PowerShell.PSConsoleReadLine]::Insert(' ')
             $position = $host.UI.RawUI.CursorPosition
@@ -116,7 +116,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
         }
     }
 
-    function Enable-PoshTransientPrompt {
+    if ("::TRANSIENT::" -eq "true") {
         Set-PSReadLineKeyHandler -Key Enter -ScriptBlock {
             $previousOutputEncoding = [Console]::OutputEncoding
             try {
@@ -145,7 +145,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
         }
     }
 
-    function Enable-PoshLineError {
+    if ("::ERROR_LINE::" -eq "true") {
         $validLine = @(Start-Utf8Process $script:OMPExecutable @("print", "valid", "--config=$env:POSH_THEME", "--shell=$script:ShellName")) -join "`n"
         $errorLine = @(Start-Utf8Process $script:OMPExecutable @("print", "error", "--config=$env:POSH_THEME", "--shell=$script:ShellName")) -join "`n"
         Set-PSReadLineOption -PromptText $validLine, $errorLine
@@ -344,6 +344,11 @@ Example:
     # set secondary prompt
     Set-PSReadLineOption -ContinuationPrompt (@(Start-Utf8Process $script:OMPExecutable @("print", "secondary", "--config=$env:POSH_THEME", "--shell=$script:ShellName")) -join "`n")
 
+    # legacy functions
+    function Enable-PoshTooltips {}
+    function Enable-PoshTransientPrompt {}
+    function Enable-PoshLineError {}
+
     Export-ModuleMember -Function @(
         "Set-PoshContext"
         "Enable-PoshTooltips"
diff --git a/src/shell/scripts/omp.zsh b/src/shell/scripts/omp.zsh
index e7cd079a..0151775f 100644
--- a/src/shell/scripts/omp.zsh
+++ b/src/shell/scripts/omp.zsh
@@ -60,9 +60,9 @@ function self-insert() {
   zle .self-insert
 }
 
-function enable_poshtooltips() {
+if [[ "::TOOLTIPS::" = "true" ]]; then
   zle -N self-insert
-}
+fi
 
 _posh-zle-line-init() {
     [[ $CONTEXT == start ]] || return 0
@@ -91,6 +91,10 @@ _posh-zle-line-init() {
     return ret
 }
 
-function enable_poshtransientprompt() {
+if [[ "::TRANSIENT::" = "true" ]]; then
   zle -N zle-line-init _posh-zle-line-init
-}
+fi
+
+# legacy functions for backwards compatibility
+function enable_poshtooltips() {}
+function enable_poshtransientprompt() {}
diff --git a/website/docs/configuration/line-error.mdx b/website/docs/configuration/line-error.mdx
index d56c1f94..29bcf583 100644
--- a/website/docs/configuration/line-error.mdx
+++ b/website/docs/configuration/line-error.mdx
@@ -20,7 +20,8 @@ There are two config settings you need to tweak:
 - `error_line`:  displays when the line is faulty
 
 You can use go [text/template][go-text-template] templates extended with [sprig][sprig] to enrich the text.
-Environment variables are available, just like the [`console_title_template`][console-title] functionality.
+All [template][templates] functionality is available, even reusing [cross segment template properties][cstp] from
+the previous primary prompt run.
 
 ## Configuration
 
@@ -49,35 +50,7 @@ The configuration has the following properties:
 
 - background: `string` [color][colors]
 - foreground: `string` [color][colors]
-- template: `string` - a go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the
-properties below - defaults to ` `
-
-## Template ([info][templates])
-
-- `.Root`: `boolean` - is the current user root/admin or not
-- `.PWD`: `string` - the current working directory
-- `.Folder`: `string` - the current working folder
-- `.Shell`: `string` - the current shell name
-- `.UserName`: `string` - the current user name
-- `.HostName`: `string` - the host name
-- `.Env.VarName`: `string` - Any environment variable where `VarName` is the environment variable name
-
-## Enable the feature
-
-Invoke Oh My Posh in your `$PROFILE` and add the following line below.
-
-```powershell
-oh-my-posh init pwsh --config $env:POSH_THEMES_PATH/jandedobbeleer.omp.json | Invoke-Expression
-// highlight-start
-Enable-PoshLineError
-// highlight-end
-```
-
-:::caution
-If you import **PSReadLine** separately, make sure to import it before the `Enable-PoshLineError` command.
-:::
-
-Restart your shell or reload your `$PROFILE` using `. $PROFILE` for the changes to take effect.
+- template: `string` - a fully featured [template][templates] - defaults to ` `
 
 [colors]: /docs/configuration/colors
 [go-text-template]: https://golang.org/pkg/text/template/
@@ -85,3 +58,4 @@ Restart your shell or reload your `$PROFILE` using `. $PROFILE` for the changes
 [console-title]: /docs/configuration/title#console-title-template
 [psreadline]: https://github.com/PowerShell/PSReadLine
 [templates]: /docs/configuration/templates
+[cstp]: /docs/configuration/templates#cross-segment-template-properties
diff --git a/website/docs/configuration/tooltips.mdx b/website/docs/configuration/tooltips.mdx
index b72b0a57..e178e3f9 100644
--- a/website/docs/configuration/tooltips.mdx
+++ b/website/docs/configuration/tooltips.mdx
@@ -53,58 +53,4 @@ This configuration will render a right-aligned git segment when you type `git` o
 A tip should not include any leading or trailing space but an interpolated one can be used, e.g., `g s`.
 Keep in mind that this is a blocking call, meaning that if the segment renders slow, you can't type until it's visible. Optimizations in this space are being explored.
 
-## Enable the feature
-
-<Tabs
-  defaultValue="pwsh"
-  groupId="shell"
-  values={[
-    { label: 'powershell', value: 'pwsh', },
-    { label: 'zsh', value: 'zsh', },
-    { label: 'fish', value: 'fish', },
-  ]
-}>
-<TabItem value="pwsh">
-
-Import/invoke Oh My Posh in your `$PROFILE` and add the following line below:
-
-```powershell
-Enable-PoshTooltips
-```
-
-For example:
-
-```powershell
-# $PROFILE
-oh-my-posh init pwsh --config ~\wildertheme.json | Invoke-Expression
-Enable-PoshTooltips
-```
-
-Restart your shell or reload your `$PROFILE` using `. $PROFILE` for the changes to take effect.
-
-</TabItem>
-<TabItem value="zsh">
-
-Invoke Oh My Posh in `.zshrc` and add the following line below:
-
-```bash
-enable_poshtooltips
-```
-
-Restart your shell or reload `.zshrc` using `exec zsh` for the changes to take effect.
-
-</TabItem>
-<TabItem value="fish">
-
-Invoke Oh My Posh in `~/.config/fish/config.fish` and add the following line below:
-
-```bash
-enable_poshtooltips
-```
-
-Restart your shell or reload fish using `exec fish` for the changes to take effect.
-
-</TabItem>
-</Tabs>
-
 [clink]: https://chrisant996.github.io/clink/
diff --git a/website/docs/configuration/transient.mdx b/website/docs/configuration/transient.mdx
index 7b76fcb8..94b3e76a 100644
--- a/website/docs/configuration/transient.mdx
+++ b/website/docs/configuration/transient.mdx
@@ -13,7 +13,8 @@ This feature only works in `fish`, `zsh`, `powershell` and `cmd` for the time be
 
 Transient prompt, when enabled, replaces the prompt with a simpler one to allow more screen real estate.
 You can use go [text/template][go-text-template] templates extended with [sprig][sprig] to enrich the text.
-Environment variables are available, just like the [`console_title_template`][console-title] functionality.
+All [template][templates] functionality is available, even reusing [cross segment template properties][cstp] from
+the previous primary prompt run.
 
 Typically, your prompt will simply leave the prompt on the screen when you execute a command (or press enter) like so:
 
@@ -48,86 +49,17 @@ The configuration has the following properties:
 - foreground_templates: foreground [color templates][color-templates]
 - background: `string` [color][colors]
 - background_templates: background [color templates][color-templates]
-- template: `string` - a go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the
-properties below - defaults to `{{ .Shell }}> `
-
-## Template ([info][templates])
-
-- `.Root`: `boolean` - is the current user root/admin or not
-- `.PWD`: `string` - the current working directory
-- `.Folder`: `string` - the current working folder
-- `.Shell`: `string` - the current shell name
-- `.UserName`: `string` - the current user name
-- `.HostName`: `string` - the host name
-- `.Code`: `int` - the last exit code
-- `.Env.VarName`: `string` - Any environment variable where `VarName` is the environment variable name
+- template: `string` - a fully featured [template][templates] - defaults to `{{ .Shell }}> `
 
 ## Enable the feature
 
-<Tabs
-  defaultValue="pwsh"
-  groupId="shell"
-  values={[
-    { label: 'powershell', value: 'pwsh', },
-    { label: 'cmd', value: 'cmd', },
-    { label: 'zsh', value: 'zsh', },
-    { label: 'fish', value: 'fish', },
-  ]
-}>
-<TabItem value="pwsh">
-
-
-Invoke Oh My Posh in your `$PROFILE` and add the following line below.
-
-```powershell
-oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/jandedobbeleer.omp.json" | Invoke-Expression
-// highlight-start
-Enable-PoshTransientPrompt
-// highlight-end
-```
-
-:::caution
-If you import **PSReadLine** separately, make sure to import it before the `Enable-PoshTransientPrompt` command.
-:::
-
-Restart your shell or reload your `$PROFILE` using `. $PROFILE` for the changes to take effect.
-
-</TabItem>
-<TabItem value="cmd">
-
-You can run the command below to enable the feature permanently:
+Oh My posh handles enabling the feature automatically for all shells except `cmd` when the config contains a
+transient prompt configuration. For `cmd`, you can run the command below once to enable the feature permanently:
 
 ```shell
 clink set prompt.transient always
 ```
 
-Restart your shell for the changes to take effect.
-
-</TabItem>
-<TabItem value="zsh">
-
-Invoke Oh My Posh in `.zshrc` and add the following line below:
-
-```bash
-enable_poshtransientprompt
-```
-
-Restart your shell or reload `.zshrc` using `exec zsh` for the changes to take effect.
-
-</TabItem>
-<TabItem value="fish">
-
-Invoke Oh My Posh in `~/.config/fish/config.fish` and add the following line below:
-
-```bash
-enable_poshtransientprompt
-```
-
-Restart your shell or reload fish using `exec fish` for the changes to take effect.
-
-</TabItem>
-</Tabs>
-
 [colors]: /docs/configuration/colors
 [go-text-template]: https://golang.org/pkg/text/template/
 [console-title]: /docs/configuration/title#console-title-template
@@ -135,3 +67,4 @@ Restart your shell or reload fish using `exec fish` for the changes to take effe
 [clink]: https://chrisant996.github.io/clink/
 [templates]: /docs/configuration/templates
 [color-templates]: /docs/configuration/colors#color-templates
+[cstp]: /docs/configuration/templates#cross-segment-template-properties


Test patch:
diff --git a/src/color/ansi_test.go b/src/color/ansi_test.go
index 2dd0a230..d7a0d374 100644
--- a/src/color/ansi_test.go
+++ b/src/color/ansi_test.go
@@ -33,7 +33,7 @@ func TestGenerateHyperlinkWithUrl(t *testing.T) {
 	}{
 		{Text: "[google](http://www.google.be)", ShellName: shell.ZSH, Expected: "%{\x1b]8;;http://www.google.be\x1b\\%}google%{\x1b]8;;\x1b\\%}"},
 		{Text: "[google](http://www.google.be)", ShellName: shell.PWSH, Expected: "\x1b]8;;http://www.google.be\x1b\\google\x1b]8;;\x1b\\"},
-		{Text: "[google](http://www.google.be)", ShellName: shell.BASH, Expected: "\\[\x1b]8;;http://www.google.be\x1b\\\\\\]google\\[\x1b]8;;\x1b\\\\\\]"},
+		{Text: "[google](http://www.google.be)", ShellName: shell.BASH, Expected: "\001\x1b]8;;http://www.google.be\x1b\\\\\002google\001\x1b]8;;\x1b\\\\\002"},
 	}
 	for _, tc := range cases {
 		a := Ansi{}
diff --git a/src/engine/migrate_test.go b/src/engine/migrate_test.go
index 573e3042..0cd90db6 100644
--- a/src/engine/migrate_test.go
+++ b/src/engine/migrate_test.go
@@ -195,7 +195,7 @@ func TestSegmentTemplateMigration(t *testing.T) {
 	}{
 		{
 			Case:     "GIT",
-			Expected: " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} working {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", // nolint: lll
+			Expected: " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} working {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll
 			Type:     GIT,
 			Props: properties.Map{
 				"local_working_icon":    " working ",
@@ -207,7 +207,7 @@ func TestSegmentTemplateMigration(t *testing.T) {
 		},
 		{
 			Case:     "GIT - Staging and Working Color",
-			Expected: " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} working <#123456>{{ .Working.String }}</>{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged <#123456>{{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", // nolint: lll
+			Expected: " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} working <#123456>{{ .Working.String }}</>{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} and{{ end }}{{ if .Staging.Changed }} staged <#123456>{{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0}} stash {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} worktree {{ .WorktreeCount }}{{ end }} ", //nolint: lll
 			Type:     GIT,
 			Props: properties.Map{
 				"local_working_icon":    " working ",
diff --git a/src/segments/brewfather_test.go b/src/segments/brewfather_test.go
index a8dcd695..51d0ee92 100644
--- a/src/segments/brewfather_test.go
+++ b/src/segments/brewfather_test.go
@@ -49,7 +49,7 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Planning Status",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Planning","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
+			{"batchNo":18,"status":"Planning","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
 			BatchReadingsJSONResponse: `[]`,
 			Template:                  "{{.StatusIcon}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}d {{end}}{{.Recipe.Name}} {{.MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{.Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}", //nolint:lll
 			ExpectedString:            " Fake Beer 1.3%",
@@ -58,7 +58,7 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Brewing Status",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Brewing","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
+			{"batchNo":18,"status":"Brewing","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
 			BatchReadingsJSONResponse: `[]`,
 			Template:                  "{{.StatusIcon}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}d {{end}}{{.Recipe.Name}} {{.MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{.Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}", //nolint:lll
 			ExpectedString:            " Fake Beer 1.3%",
@@ -67,7 +67,7 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Fermenting Status, no readings",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
+			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
 			BatchReadingsJSONResponse: `[]`,
 			Template:                  "{{.StatusIcon}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}d {{end}}{{.Recipe.Name}} {{.MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{.Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}", //nolint:lll
 			ExpectedString:            " 19d Fake Beer 1.3%",
@@ -76,7 +76,7 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Fermenting Status, one reading",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
+			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
 			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}]`,
 			Template:                  "{{.StatusIcon}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}d {{end}}{{.Recipe.Name}} {{.MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{.Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}", //nolint:lll
 			ExpectedString:            " 19d Fake Beer 1.3%: 1.066 19.5° →",
@@ -85,8 +85,8 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Fermenting Status, two readings, temp trending up",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
-			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}, {"id":"manual","temp":21,"comment":"","sg":1.063,"time":` + FakeReading2DateString + `,"type":"manual"}]`,                                    // nolint:lll
+			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
+			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}, {"id":"manual","temp":21,"comment":"","sg":1.063,"time":` + FakeReading2DateString + `,"type":"manual"}]`,                                    //nolint:lll
 			Template:                  "{{.StatusIcon}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}d {{end}}{{.Recipe.Name}} {{.MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{.Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}", //nolint:lll
 			ExpectedString:            " 19d Fake Beer 1.3%: 1.063 21° ↗",
 			ExpectedEnabled:           true,
@@ -94,8 +94,8 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Fermenting Status, three readings, temp trending hard down, include age of most recent reading",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
-			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}, {"id":"manual","temp":21,"comment":"","sg":1.063,"time":` + FakeReading2DateString + `,"type":"manual"}, {"id":"manual","temp":15,"comment":"","sg":1.050,"time":` + FakeReading3DateString + `,"type":"manual"}]`, // nolint:lll
+			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
+			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}, {"id":"manual","temp":21,"comment":"","sg":1.063,"time":` + FakeReading2DateString + `,"type":"manual"}, {"id":"manual","temp":15,"comment":"","sg":1.050,"time":` + FakeReading3DateString + `,"type":"manual"}]`, //nolint:lll
 			Template:                  "{{.StatusIcon}} {{.ReadingAge}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}d {{end}}{{.Recipe.Name}} {{.MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{.Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}",                                                       //nolint:lll
 			ExpectedString:            " 451 19d Fake Beer 1.3%: 1.05 15° ↓↓",
 			ExpectedEnabled:           true,
@@ -103,7 +103,7 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case:                      "Bad batch json, readings fine",
 			BatchJSONResponse:         ``,
-			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}, {"id":"manual","temp":21,"comment":"","sg":1.063,"time":` + FakeReading2DateString + `,"type":"manual"}, {"id":"manual","temp":15,"comment":"","sg":1.050,"time":` + FakeReading3DateString + `,"type":"manual"}]`, // nolint:lll
+			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}, {"id":"manual","temp":21,"comment":"","sg":1.063,"time":` + FakeReading2DateString + `,"type":"manual"}, {"id":"manual","temp":15,"comment":"","sg":1.050,"time":` + FakeReading3DateString + `,"type":"manual"}]`, //nolint:lll
 			Template:                  "{{.StatusIcon}} {{.ReadingAge}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}d {{end}}{{.Recipe.Name}} {{.MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{.Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}",                                                       //nolint:lll
 			ExpectedString:            "",
 			ExpectedEnabled:           false,
@@ -111,8 +111,8 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Conditioning Status",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Conditioning","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
-			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}, {"id":"manual","temp":21,"comment":"","sg":1.063,"time":` + FakeReading2DateString + `,"type":"manual"}, {"id":"manual","temp":15,"comment":"","sg":1.050,"time":` + FakeReading3DateString + `,"type":"manual"}]`, // nolint:lll
+			{"batchNo":18,"status":"Conditioning","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
+			BatchReadingsJSONResponse: `[{"id":"manual","temp":19.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}, {"id":"manual","temp":21,"comment":"","sg":1.063,"time":` + FakeReading2DateString + `,"type":"manual"}, {"id":"manual","temp":15,"comment":"","sg":1.050,"time":` + FakeReading3DateString + `,"type":"manual"}]`, //nolint:lll
 			Template:                  "{{.StatusIcon}} {{if .DaysBottledOrFermented}}{{.DaysBottledOrFermented}}d {{end}}{{.Recipe.Name}} {{.MeasuredAbv}}%{{ if and (.Reading) (eq .Status \"Fermenting\")}}: {{.Reading.Gravity}} {{.Reading.Temperature}}° {{.TemperatureTrendIcon}}{{end}}",                                                                       //nolint:lll
 			ExpectedString:            " 5d Fake Beer 1.3%",
 			ExpectedEnabled:           true,
@@ -120,7 +120,7 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Fermenting Status, test all unit conversions",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
+			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
 			BatchReadingsJSONResponse: `[{"id":"manual","temp":34.5,"comment":"","sg":1.066,"time":` + FakeReading1DateString + `,"type":"manual"}]`,
 			Template:                  "{{ if and (.Reading) (eq .Status \"Fermenting\") }}SG: ({{.Reading.Gravity}} Bx:{{.SGToBrix .Reading.Gravity}} P:{{.SGToPlato .Reading.Gravity}}), Temp: (C:{{.Reading.Temperature}} F:{{.DegCToF .Reading.Temperature}} K:{{.DegCToKelvin .Reading.Temperature}}){{end}}", //nolint:lll
 			ExpectedString:            "SG: (1.066 Bx:16.13 P:16.13), Temp: (C:34.5 F:94.1 K:307.7)",
@@ -129,7 +129,7 @@ func TestBrewfatherSegment(t *testing.T) {
 		{
 			Case: "Fermenting Status, test all unit conversions 2",
 			BatchJSONResponse: `
-			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, // nolint:lll
+			{"batchNo":18,"status":"Fermenting","brewDate":` + FakeBrewDateString + `,"bottlingDate":` + FakeBottlingDateString + `,"recipe":{"name":"Fake Beer"},"fermentationStartDate":` + FakeFermStartDateString + `,"name":"Batch","measuredAbv": 1.3}`, //nolint:lll
 			BatchReadingsJSONResponse: `[{"id":"manual","temp":3.5,"comment":"","sg":1.004,"time":` + FakeReading1DateString + `,"type":"manual"}]`,
 			Template:                  "{{ if and (.Reading) (eq .Status \"Fermenting\") }}SG: ({{.Reading.Gravity}} Bx:{{.SGToBrix .Reading.Gravity}} P:{{.SGToPlato .Reading.Gravity}}), Temp: (C:{{.Reading.Temperature}} F:{{.DegCToF .Reading.Temperature}} K:{{.DegCToKelvin .Reading.Temperature}}){{end}}", //nolint:lll
 			ExpectedString:            "SG: (1.004 Bx:1.03 P:1.03), Temp: (C:3.5 F:38.3 K:276.7)",
diff --git a/src/segments/java_test.go b/src/segments/java_test.go
index addd89aa..fb4d97f1 100644
--- a/src/segments/java_test.go
+++ b/src/segments/java_test.go
@@ -20,7 +20,7 @@ func TestJava(t *testing.T) {
 		{
 			Case:           "Zulu LTS",
 			ExpectedString: "11.0.13",
-			Version:        "OpenJDK 64-Bit Server VM (11.0.13+8-LTS) for windows-amd64 JRE (Zulu11.52+13-CA) (11.0.13+8-LTS), built on Oct 7 2021 16:00:23 by \"zulu_re\" with MS VC++ 15.9 (VS2017)", // nolint:lll
+			Version:        "OpenJDK 64-Bit Server VM (11.0.13+8-LTS) for windows-amd64 JRE (Zulu11.52+13-CA) (11.0.13+8-LTS), built on Oct 7 2021 16:00:23 by \"zulu_re\" with MS VC++ 15.9 (VS2017)", //nolint:lll
 		},
 		{
 			Case:           "OpenJDK macOS",
diff --git a/src/segments/nightscout_test.go b/src/segments/nightscout_test.go
index 2f456bf5..3f8099f7 100644
--- a/src/segments/nightscout_test.go
+++ b/src/segments/nightscout_test.go
@@ -28,7 +28,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "Flat 150",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":150,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"Flat","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":150,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"Flat","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 150→",
 			ExpectedEnabled: true,
@@ -36,7 +36,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "DoubleDown 50",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":50,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":50,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 50↓↓",
 			ExpectedEnabled: true,
@@ -44,7 +44,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "DoubleUp 250",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":250,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleUp","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":250,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleUp","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 250↑↑",
 			ExpectedEnabled: true,
@@ -52,7 +52,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "SingleUp 130",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":130,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"SingleUp","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":130,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"SingleUp","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 130↑",
 			ExpectedEnabled: true,
@@ -60,7 +60,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "FortyFiveUp 174",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":174,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"FortyFiveUp","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":174,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"FortyFiveUp","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 174↗",
 			ExpectedEnabled: true,
@@ -68,7 +68,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "FortyFiveDown 61",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":61,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"FortyFiveDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":61,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"FortyFiveDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 61↘",
 			ExpectedEnabled: true,
@@ -76,7 +76,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "DoubleDown 50",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":50,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":50,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 50↓↓",
 			ExpectedEnabled: true,
@@ -95,7 +95,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "DoubleDown 50 from cache",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":50,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":50,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 50↓↓",
 			ExpectedEnabled: true,
@@ -104,7 +104,7 @@ func TestNSSegment(t *testing.T) {
 		{
 			Case: "DoubleDown 50 from cache not found",
 			JSONResponse: `
-			[{"_id":"619d6fa819696e8ded5b2206","sgv":50,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, // nolint:lll
+			[{"_id":"619d6fa819696e8ded5b2206","sgv":50,"date":1637707537000,"dateString":"2021-11-23T22:45:37.000Z","trend":4,"direction":"DoubleDown","device":"share2","type":"sgv","utcOffset":0,"sysTime":"2021-11-23T22:45:37.000Z","mills":1637707537000}]`, //nolint:lll
 			Template:        "\ue2a1 {{.Sgv}}{{.TrendIcon}}",
 			ExpectedString:  "\ue2a1 50↓↓",
 			ExpectedEnabled: true,
diff --git a/src/segments/path_test.go b/src/segments/path_test.go
index fc164f7f..2b0a2ae1 100644
--- a/src/segments/path_test.go
+++ b/src/segments/path_test.go
@@ -557,7 +557,7 @@ func TestGetFolderPathCustomMappedLocations(t *testing.T) {
 	assert.Equal(t, "#", got)
 }
 
-func TestAgnosterPath(t *testing.T) { // nolint:dupl
+func TestAgnosterPath(t *testing.T) { //nolint:dupl
 	cases := []struct {
 		Case          string
 		Expected      string
@@ -605,7 +605,7 @@ func TestAgnosterPath(t *testing.T) { // nolint:dupl
 	}
 }
 
-func TestAgnosterLeftPath(t *testing.T) { // nolint:dupl
+func TestAgnosterLeftPath(t *testing.T) { //nolint:dupl
 	cases := []struct {
 		Case          string
 		Expected      string