mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-31 06:16:33 -04:00
Simplify text editor fallback
This commit is contained in:
+1
-14
@@ -2,17 +2,4 @@
|
||||
|
||||
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
|
||||
}
|
||||
const fallbackEditor = "vi" // vi is pre-installed on most UNIX-like systems
|
||||
|
||||
Reference in New Issue
Block a user