Files
config-bash/libs/note.bash
T
xavier 6a53ee36fd chore(rc,profile,aliases,completion,libs,functions): Remove shebangs from sourced files
These files are always sourced (never executed directly), so the
#!/bin/bash shebang is inert and misleading. Drop it consistently
across rc.d/*, profile.d/*, and aliases.d/*.
2026-08-22 00:52:02 +02:00

18 lines
388 B
Bash

note() {
# if file doesn't exist, create it
if [[ ! -f $HOME/.notes ]]; then
touch "$HOME"/.notes
fi
if [[ $# -eq 0 ]]; then
# no arguments, print file
cat "$HOME"/.notes
elif [[ "$1" == "-c" ]]; then
# clear file
echo "" >"$HOME"/.notes
else
# add all arguments to file
echo "$@" >>"$HOME"/.notes
fi
}