fix(tui): add $VISUAL fallback for editor resolution
Check $EDITOR, then $VISUAL, then fall back to vi.
This commit is contained in:
@@ -181,6 +181,9 @@ func loadTags(store *db.Store) tea.Cmd {
|
|||||||
|
|
||||||
func editInEditor(store *db.Store, e *db.Entity) tea.Cmd {
|
func editInEditor(store *db.Store, e *db.Entity) tea.Cmd {
|
||||||
editorEnv := os.Getenv("EDITOR")
|
editorEnv := os.Getenv("EDITOR")
|
||||||
|
if editorEnv == "" {
|
||||||
|
editorEnv = os.Getenv("VISUAL")
|
||||||
|
}
|
||||||
if editorEnv == "" {
|
if editorEnv == "" {
|
||||||
editorEnv = "vi"
|
editorEnv = "vi"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user