Skip to content

Commit

Permalink
Improved the godoc and inline comments for the LaunchEditor method
Browse files Browse the repository at this point in the history
  • Loading branch information
ojarjur committed Jan 14, 2016
1 parent dfdd159 commit aee6f75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions commands/input/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import (
"os/exec"
)

// LaunchEditor launches the default editor configured for the given repo.
// LaunchEditor launches the default editor configured for the given repo. This
// method blocks until the editor command has returned.
//
// The specified filename should be a temporary file and provided as a relative path
// from the repo (e.g. "FILENAME" will be converted to ".git/FILENAME"). This file
Expand All @@ -45,7 +46,7 @@ func LaunchEditor(repo repository.Repo, fileName string) (string, error) {
// Running the editor directly did not work. This might mean that
// the editor string is not a path to an executable, but rather
// a shell command (e.g. "emacsclient --tty"). As such, we'll try
// to run the command through bash, and if that failse try with sh
// to run the command through bash, and if that fails, try with sh
args := []string{"-c", fmt.Sprintf("%s %q", editor, path)}
cmd, err = startInlineCommand("bash", args...)
if err != nil {
Expand Down

0 comments on commit aee6f75

Please sign in to comment.