ref
This commit is contained in:
parent
58fe1ab39d
commit
af97f24988
@ -41,7 +41,7 @@ NAMESPACES
|
|||||||
|
|
||||||
die() {
|
die() {
|
||||||
echo "$(basename "${0}"): Error: ${1}" 1>&2
|
echo "$(basename "${0}"): Error: ${1}" 1>&2
|
||||||
exit "${2:-$EXIT_SUCCESS}"
|
exit "${2:-${EXIT_SUCCESS}}"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_notes_sorted_by_access_time() {
|
get_notes_sorted_by_access_time() {
|
||||||
@ -84,7 +84,7 @@ find_note_name_by_index() {
|
|||||||
cmd_add_note() {
|
cmd_add_note() {
|
||||||
note="${NOTES_DIR}/$*"
|
note="${NOTES_DIR}/$*"
|
||||||
touch "${note}"
|
touch "${note}"
|
||||||
exit "$EXIT_SUCCESS"
|
exit "${EXIT_SUCCESS}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_delete_note() {
|
cmd_delete_note() {
|
||||||
@ -103,7 +103,7 @@ cmd_delete_note() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
exit "$EXIT_SUCCESS"
|
exit "${EXIT_SUCCESS}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_edit_note() {
|
cmd_edit_note() {
|
||||||
@ -115,8 +115,8 @@ cmd_edit_note() {
|
|||||||
die "Note with index ${note_index} not found" 1
|
die "Note with index ${note_index} not found" 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$EDITOR "${note_to_edit}"
|
${EDITOR} "${note_to_edit}"
|
||||||
exit "$EXIT_SUCCESS"
|
exit "${EXIT_SUCCESS}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_cat_note() {
|
cmd_cat_note() {
|
||||||
@ -129,7 +129,7 @@ cmd_cat_note() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cat "${note_to_cat}"
|
cat "${note_to_cat}"
|
||||||
exit "$EXIT_SUCCESS"
|
exit "${EXIT_SUCCESS}"
|
||||||
}
|
}
|
||||||
|
|
||||||
prettify() {
|
prettify() {
|
||||||
@ -163,7 +163,7 @@ fi
|
|||||||
|
|
||||||
if [ -z "${1+x}" ]; then
|
if [ -z "${1+x}" ]; then
|
||||||
cmd_show_notes
|
cmd_show_notes
|
||||||
exit "$EXIT_SUCCESS"
|
exit "${EXIT_SUCCESS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -177,4 +177,4 @@ case "${1}" in
|
|||||||
|
|
||||||
*) cmd_cat_note "$@" ;;
|
*) cmd_cat_note "$@" ;;
|
||||||
esac
|
esac
|
||||||
exit "$EXIT_SUCCESS"
|
exit "${EXIT_SUCCESS}"
|
||||||
4
install
4
install
@ -24,7 +24,7 @@ _die() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
string_get_first_char() (
|
string_get_first_char() (
|
||||||
printf %.1s "${1}"
|
printf '%.1s' "${1}"
|
||||||
)
|
)
|
||||||
|
|
||||||
string_exclude_first_char() (
|
string_exclude_first_char() (
|
||||||
@ -68,7 +68,7 @@ _link_files_in_sandbox() (
|
|||||||
)
|
)
|
||||||
|
|
||||||
_compare_sandbox_to_home() (
|
_compare_sandbox_to_home() (
|
||||||
comparisons="$(diff -rq "$SANDBOX_PATH" "$TARGET_PATH")" || true
|
comparisons="$(diff -rq "${SANDBOX_PATH}" "${TARGET_PATH}")" || true
|
||||||
echo "${comparisons}" | grep -vE "^Only in .+" || true
|
echo "${comparisons}" | grep -vE "^Only in .+" || true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user