Closed jacobmischka closed 7 years ago
Changes looks good, but it'd be great to have a couple of tests covering this. Check out the existing $EDITOR
vs editor
tests, which should give you a good base to build on: https://github.com/pimterry/notes/blob/master/test/test-open.bats#L95-L127
Okay, done. I only added one, it seems to me like all cases should be covered with this combined with the existing $EDITOR ones, but let me know if there's something I missed.
This now has conflicts (there's been quite a few PRs over the last couple of days I'm afraid, on one single file, so it's a bit of a moving target!). In addition, I think https://github.com/pimterry/notes/issues/21 supersedes this. An $EDITOR
override is a good idea, but it's not the common case, and it should live in proper config. We should try and avoid the temptation to let env vars proliferate.
Excellent idea and direction, and these changes and tests do now look great otherwise, but I'm going to close this, and I think we should move forwards on config instead.
Check $NOTES_EDITOR first and use it instead of $EDITOR if it exists.
In case users want to use a special markdown editor for notes for example instead of the usual $EDITOR.
This was originally made in #13, but I wanted to use master for something else so created this again using a different branch. Sorry about that!