Skip to content

Commit 45258f7

Browse files
authored
Merge pull request #14 from koooge/editor_default
Set default editor
2 parents c784cce + 9c69c65 commit 45258f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/edit.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,9 @@ func editFile(path string) string {
6060
}
6161

6262
func getDefaultEditor() string {
63-
return os.Getenv("EDITOR")
63+
editor := os.Getenv("EDITOR")
64+
if editor == "" {
65+
return "vi"
66+
}
67+
return editor
6468
}

0 commit comments

Comments
 (0)