Simplify text editor fallback

This commit is contained in:
2024-07-17 17:26:01 -04:00
parent c9b87dd121
commit 1e5c0feaba
3 changed files with 3 additions and 23 deletions
+2 -4
View File
@@ -1,6 +1,7 @@
package cli
import (
"cmp"
"fmt"
"os"
"strconv"
@@ -27,10 +28,7 @@ func TempInitCli() {
}
// textEditor
textEditor := input("Text editor (leave blank for $EDITOR, falls back to \"" + fallbackEditor + "\"):")
if textEditor == "" {
textEditor = textEditorFallback()
}
textEditor := cmp.Or(input("Text editor (leave blank for $EDITOR, falls back to \""+fallbackEditor+"\"):"), os.Getenv("EDITOR"), fallbackEditor)
// SSH info
configSSH := inputBinary("Configure SSH settings (for synchronization)?")