Skip to content

Commit

Permalink
#9 fix: only store last command if it was set
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Sep 17, 2023
1 parent 17d2a5f commit d0786e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# QOwnNotes command-line snippet manager changelog

## v0.5.1
- The last selected command is now only stored when there actually was a command selected and
the dialog wasn't quit without selecting a command (for [#9](https://github.com/qownnotes/qc/issues/9))

## v0.5.0
- The last executed command is now stored and can be executed again via `qc exec --last`
(for [#9](https://github.com/qownnotes/qc/issues/9))
Expand Down
2 changes: 1 addition & 1 deletion cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func execute(cmd *cobra.Command, args []string) (err error) {
fmt.Printf("%s: %s\n", color.YellowString("Command"), command)
}

if writeLastCmd {
if writeLastCmd && command != "" {
// store last command
writeLastCmdFile(command)
}
Expand Down
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

buildGoModule rec {
pname = "qc";
version = "0.5.0";
version = "0.5.1";

src = builtins.path { path = ./.; name = "qc"; };

Expand Down

0 comments on commit d0786e3

Please sign in to comment.