Skip to content
/ extedit Public

Open an editor as part of the interface of a command line tool. Think `git rebase -i`

License

Notifications You must be signed in to change notification settings

kioopi/extedit

Repository files navigation

extedit

Open an external editor as part of the user interface of a command-line programm. Think git rebase -i.

import (
    "strings"
    "github.com/kioopi/extedit"
)

func main() {
    input := strings.NewReader("Line 1\nLine 2")

    diff := extedit.Invoke(input)

    # diff.Lines() []string contains the edited input.
    # diff.Differences []int  contains indexes of changed lines.
}

About

Open an editor as part of the interface of a command line tool. Think `git rebase -i`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages