no need to use "env" if $EDITOR is set

master
Sina Siadat 9 years ago
parent 03c17c99f0
commit 8fd00b4699

@ -58,8 +58,8 @@ eton is a note-taking cli tool.
Notes are stored in ~/.etondb
echo 'SELECT * from attributes LIMIT 10;' |sqlite3 ~/.etondb
echo 'SELECT * FROM attributes LIMIT 10;' |sqlite3 ~/.etondb
Set `$EDITOR` environment variable to your prefered editor used by the `edit` command. E.g.,
Set `$EDITOR` environment variable to edit notes in your prefered editor, e.g., `export EDITOR=vim`.
I would love to hear how you use eton. Make pull requests, report bugs, suggest ideas.

@ -369,7 +369,7 @@ func openEditor(filepath string) {
editor := os.Getenv("EDITOR")
if len(editor) > 0 {
cmd = exec.Command("/usr/bin/env", editor, filepath)
cmd = exec.Command(editor, filepath)
} else {
if _, err := os.Stat("/usr/bin/sensible-editor"); err == nil {
cmd = exec.Command("/usr/bin/sensible-editor", filepath)

Loading…
Cancel
Save