pimterry / notes

:pencil: Simple delightful note taking, with more unix and less lock-in.
https://github.com/pimterry/notes
MIT License
1.24k stars 82 forks source link

settting $NOTES_DIRECTORY does not affect program #64

Closed epogrebnyak closed 5 years ago

epogrebnyak commented 5 years ago

Issue Summary

$NOTES_DIRECTORY does not affect program

Steps to Reproduce

-bash: some/directory: Is a directory

Your notes directory is /home/epo/notes. You can override this by setting $NOTES_DIRECTORY to your preferred path.

pimterry commented 5 years ago

If you try export NOTES_DIRECTORY=some/directory instead, does it work? Export is required to set variables in bash that can be seen by child processes: https://stackoverflow.com/questions/1158091/defining-a-variable-with-or-without-export

I think you'll also want to use an absolute path. If you use a relative path (like some/directory), then your note storage will depend on your current working directory.

epogrebnyak commented 5 years ago

Many thanks for the explanation - export NOTES_DIRECTORY=/abspath/some/directory works just fine! Perhaps I can do a PR to update readme on this, to clarify the setting for users like myself?