diff --git a/Changelog.md b/Changelog.md index 106d138..88da12b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,9 @@ # Notes Changelog +## 0.4.0 + +- Opens editor with note name anyway if it doesn't exist yet. + ## 0.3.0 - Colorize commented lines. diff --git a/notes.go b/notes.go index 13b7bd8..2e35be2 100644 --- a/notes.go +++ b/notes.go @@ -29,7 +29,8 @@ func showNote(note string) { path := fmt.Sprintf("%v%v.txt", getHomeDir(), note) file, err := os.Open(path) if err != nil { - fmt.Printf("%v\n", err) + // File does not exist, creating it + editOrCreateNote(note) } defer file.Close() @@ -79,7 +80,7 @@ func getHomeDir() string { func main() { app := cli.NewApp() app.Name = "notes" - app.Version = "0.3.0" + app.Version = "0.4.0" app.Usage = "Store your thoughts on all sorts of subjects" app.Action = func(c *cli.Context) { note := c.Args().First()