Compare commits

..

No commits in common. "0f5ca2208650c550a2675dedfae27306ea0043c9" and "2c5214f772cc17eb8f9832d95d783473a0f801ab" have entirely different histories.

6 changed files with 11 additions and 11 deletions

4
dnote
View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(command -v nnote)" ]; then
NNOTE="$(command -v nnote)"
if [ -f "$(which nnote)" ]; then
NNOTE="$(which nnote)"
else
NOTEBIN="$( dirname -- "$( readlink -f -- "$0"; )"; )"
NNOTE="$NOTEBIN/nnote"

4
gnote
View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(command -v nnote)" ]; then
NNOTE="$(command -v nnote)"
if [ -f "$(which nnote)" ]; then
NNOTE="$(which nnote)"
else
NOTEBIN="$( dirname -- "$( readlink -f -- "$0"; )"; )"
NNOTE="$NOTEBIN/nnote"

4
mnote
View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(command -v nnote)" ]; then
NNOTE="$(command -v nnote)"
if [ -f "$(which nnote)" ]; then
NNOTE="$(which nnote)"
else
NOTEBIN="$( dirname -- "$( readlink -f -- "$0"; )"; )"
NNOTE="$NOTEBIN/nnote"

4
nnote
View File

@ -40,11 +40,11 @@ else
NOTEPATH="$DATEDIR/$NOTENAME"
echo "$NOTEPATH"
if ! [ -f "$NOTEPATH" ]; then
printf "%s%s\n---\n\n" "$NOTENAME" "$NOTEHEAD" > "$NOTEPATH"
printf "$NOTENAME$NOTEHEAD\n---\n\n" > "$NOTEPATH"
fi
pushd "$NOTESDIR" > /dev/null
printf "\033]2;$NOTENAME $NOTETYPE note\a"
%{EDITOR:-vi} "$NOTEPATH" || true # || true so we always clear header and popd
$EDITOR "$NOTEPATH"
printf "\033]2;\a"
popd > /dev/null
fi

2
nnotes
View File

@ -16,7 +16,7 @@ elif [[ "$NOTETYPE" == "global" ]]; then
else
echo "usage: nnotes <type>"
echo " open $EDITOR (\$EDITOR) in the directory for \$type notes"
echo " nnotes <type> --help | -h"
echo " nnote <type> --help | -h"
echo " get help for a note type"
echo " "
echo "nnotes requires a type: daily, monthly, yearly, or global"

4
ynote
View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(command -v nnote)" ]; then
NNOTE="$(command -v nnote)"
if [ -f "$(which nnote)" ]; then
NNOTE="$(which nnote)"
else
NOTEBIN="$( dirname -- "$( readlink -f -- "$0"; )"; )"
NNOTE="$NOTEBIN/nnote"