diff --git a/editor.go b/editor.go index 84ef243c..27341b62 100644 --- a/editor.go +++ b/editor.go @@ -29,6 +29,7 @@ type Editor struct { Message string Default string Help string + Editor string HideDefault bool AppendDefault bool } @@ -143,6 +144,11 @@ func (e *Editor) Prompt() (interface{}, error) { return "", err } + // check is input editor exist + if e.Editor != "" { + editor = e.Editor + } + // open the editor cmd := exec.Command(editor, f.Name()) cmd.Stdin = os.Stdin