Skip to content

Commit

Permalink
Merge pull request #9 from tadashi-aikawa/0.8.0
Browse files Browse the repository at this point in the history
0.8.0
  • Loading branch information
tadashi-aikawa committed Apr 7, 2019
2 parents 8a43b16 + 34ceb06 commit c16c206
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions args.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/pkg/errors"
)

const version = "0.7.0"
const version = "0.8.0"
const usage = `Gowl.
Usage:
Expand Down Expand Up @@ -42,7 +42,21 @@ type Args struct {
BitbucketServer bool `docopt:"--bitbucket-server"`
}

// CreateArgs creates Args
/*
CreateArgs creates Args.
Example:
args, appEnd, err := CreateArgs(usage, os.Args[1:], version)
if err != nil {
log.Fatal(errors.Wrap(err, "Fail to create arguments."))
}
if appEnd {
return
}
fmt.Println(args)
*/
func CreateArgs(usage string, argv []string, version string) (Args, bool, error) {
parser := &docopt.Parser{
HelpHandler: docopt.PrintHelpOnly,
Expand Down
2 changes: 1 addition & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func CmdEdit(handler IHandler, root string, subSpaces []string, editor string) e
return errors.Wrap(err, "Fail to select a repository.")
}

if err := execCommand(&selection, editor); err != nil {
if err := execCommand(&selection, editor, "."); err != nil {
return errors.Wrap(err, fmt.Sprintf("Fail to edit repository %v", selection))
}

Expand Down

0 comments on commit c16c206

Please sign in to comment.