nix/modules/home-manager/scripts/common/bin/nf
Daniel Flanagan 26f2784f0f
All checks were successful
/ check (push) Successful in 3m41s
Force umask when creating notes
2024-09-09 10:16:11 -05:00

9 lines
164 B
Bash
Executable file

#!/usr/bin/env sh
umask 0077
SUBDIR="${2:-./}"
mkdir -p "$NOTES_PATH/$SUBDIR"
cd "$NOTES_PATH/$SUBDIR" || exit 1
"$EDITOR" "$NOTES_PATH/$SUBDIR/$1"
cd - || exit 1