From 449c6c05974087ed364fd602a701bd6b46c96fae Mon Sep 17 00:00:00 2001 From: Dakota Chambers Date: Tue, 28 Jul 2020 14:33:43 -0500 Subject: [PATCH] Fix noterc path when `XDG_CONFIG_HOME` is not set --- CHANGELOG.md | 2 ++ note | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 693abbc..49fbab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG +## v0.4.1 - 28 July 2020 + ## v0.4.0 - 28 July 2020 * Added config file (noterc) diff --git a/note b/note index 0615922..d927a0f 100755 --- a/note +++ b/note @@ -6,7 +6,7 @@ DAY=$(date +'%d') NOTE_DIR="$HOME/notes/$YEAR/$MONTH" NOTE_NAME="$DAY.md" -NOTERC="${XDG_CONFIG_HOME:-$HOME}/notekeeper/noterc" +NOTERC="${XDG_CONFIG_HOME:-$HOME/.config}/notekeeper/noterc" if [ -f "$NOTERC" ]; then source "$NOTERC"; fi create_note() { @@ -32,7 +32,7 @@ print_info() { } print_help() { - printf "note - Note Keeper 0.4.0 (28 July 2020) + printf "note - Note Keeper 0.4.1 (28 July 2020) Usage: note [arguments] @@ -45,7 +45,7 @@ Arguments: Don't forget an extension like .md -i | --info Print information about a note. -The script loads configuration variables from \${XDG_CONFIG_HOME:-\$HOME}/notekeeper/noterc. +The script loads configuration variables from \${XDG_CONFIG_HOME:-\$HOME/.config}/notekeeper/noterc. Example: # Directory where the current note should be stored