Files
MUTN/src/cli/initUNIX.go
T

19 lines
384 B
Go

//go:build !windows
package cli
import (
"os"
)
const fallbackEditor = "vi" // vi is pre-installed on most UNIX systems
// textEditorFallback returns the value of the $EDITOR environment variable, or FallbackEditor if it is not set
func textEditorFallback() string {
textEditor := os.Getenv("EDITOR")
if textEditor == "" {
textEditor = fallbackEditor
}
return textEditor
}