I discovered that calling note rm -r or note rm --recursivewithout passing a file or folder will recursively delete the entire notes directory (mine were backed up, of course).
This fix just adds a simple check to see if there is an argument passed. Very similar to the checks already used in the grep and cat functions.
The tests were failing on MacOS as rm --recursive isn't supported, so I added a check when creating the recursive flag.
I added further tests for the above recursive remove fix.
I also snuck in a tiny fix to handle directory names with spaces (thanks, Google Drive).
I discovered that calling
note rm -r
ornote rm --recursive
without passing a file or folder will recursively delete the entire notes directory (mine were backed up, of course).This fix just adds a simple check to see if there is an argument passed. Very similar to the checks already used in the grep and cat functions.
The tests were failing on MacOS as
rm --recursive
isn't supported, so I added a check when creating the recursive flag.I added further tests for the above recursive remove fix.
I also snuck in a tiny fix to handle directory names with spaces (thanks, Google Drive).