File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ __notes_cmd ()
3131
3232_notes ()
3333{
34+ # Look for configuration file at ~/.config/notes/config and use it
35+ if [ -f ~/.config/notes/config ]; then
36+ . ~/.config/notes/config
37+ fi
38+
3439 local configured_dir=${NOTES_DIRECTORY%/}
3540 local note_dir="${configured_dir:-$HOME/notes}"
3641
Original file line number Diff line number Diff line change 1- # This is an example configuration file for notes
1+ # This is an example configuration file for notes
22# To use it, copy to ~/.config/notes/config
33# This config is case sensitive
44
99# QUICKNOTE_FORMAT="%Y-%m-%d"
1010
1111# Set extension to plain txt instead of markdown
12- #NOTES_EXT="txt"
12+ # NOTES_EXT="txt"
13+
14+ # Define the directory where notes are stored
15+ # NOTES_DIRECTORY=~/notes
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33_notes_complete_notes () {
4+ # Look for configuration file at ~/.config/notes/config and use it
5+ if [ -f ~ /.config/notes/config ]; then
6+ . ~ /.config/notes/config
7+ fi
8+
49 local configured_dir=${NOTES_DIRECTORY%/ } # Remove trailing slashes
510 local notes_dir=" ${configured_dir:- $HOME / notes} "
611 local OLD_IFS=" $IFS "
You can’t perform that action at this time.
0 commit comments