Update nnotes to properly handle directory listing

This commit is contained in:
ViViDboarder 2019-10-29 17:56:25 -07:00
parent 93f8a6e230
commit 46dcd759c1

View File

@ -20,7 +20,7 @@ function main() {
cd $NOTES_DIR
mkdir -p $CATEGORY
nvim $CATEGORY/$FILE.md
nvim $CATEGORY/$FILE
}
case $# in
@ -30,11 +30,11 @@ case $# in
;;
1)
CATEGORY=.
FILE="$1"
FILE="$1.md"
;;
2)
CATEGORY="$1"
FILE="$2"
FILE="$2.md"
;;
*)
echo "Unknown number of arugments"