Use vi when $EDITOR is empty

This commit is contained in:
Yasuhiro Matsumoto 2020-01-08 01:13:05 +09:00
parent 06dd54fc4e
commit ebadaeb651
No known key found for this signature in database
GPG key ID: 622DE34DC490584B

View file

@ -84,7 +84,7 @@ func rename(args []string) error {
f.WriteString("\n")
}
editor := os.Getenv("EDITOR")
if editor != "" {
if editor == "" {
editor = "vi"
}
tty, err := tty.Open()