@@ -27,17 +27,20 @@ if [ -z "$EDITOR" ] && type editor &>/dev/null; then
2727 EDITOR=editor
2828fi
2929
30+ # shellcheck disable=SC2317
3031without_notes_dir () {
3132 cat | sed -e " s/^$escaped_notes_dir //g" | sed -E " s/^\/+//g"
3233}
3334
3435FIND_FILTER=(-not -path ' */\.*' -type f)
3536
37+ # shellcheck disable=SC2317
3638_find_notes () {
3739 local root=" $1 " && shift
3840 find " $root " " ${FIND_FILTER[@]} " " $@ "
3941}
4042
43+ # shellcheck disable=SC2317
4144ls_notes () {
4245 local ls_output
4346 ls_output=$( cd " $notes_dir " && ls " $@ " )
@@ -54,6 +57,7 @@ ls_notes() {
5457 fi
5558}
5659
60+ # shellcheck disable=SC2317
5761find_notes () {
5862 local find_output
5963 find_output=$( _find_notes " $notes_dir " -ipath " $notes_dir /*$* *" 2>&1 )
@@ -69,6 +73,7 @@ find_notes() {
6973 fi
7074}
7175
76+ # shellcheck disable=SC2317
7277grep_notes () {
7378 if [ ! " $# " -gt 0 ]; then
7479 printf " Grep requires a pattern, but none was provided."
@@ -89,6 +94,7 @@ grep_notes() {
8994 fi
9095}
9196
97+ # shellcheck disable=SC2317
9298search_filenames_and_contents () {
9399 if [ " $# " -gt 0 ]; then
94100 formatted_output=" $( { find_notes " $@ " ; grep_notes " $@ " ; }) "
@@ -103,6 +109,7 @@ search_filenames_and_contents() {
103109 fi
104110}
105111
112+ # shellcheck disable=SC2317
106113generate_name () {
107114 local append_num=0
108115 local format_string
@@ -117,6 +124,7 @@ generate_name() {
117124 printf ' %s' " $resolved_name "
118125}
119126
127+ # shellcheck disable=SC2317
120128new_note () {
121129 local note_name=" $* "
122130 if [[ $note_name == " " ]]; then
@@ -132,18 +140,21 @@ new_note() {
132140 open_note " $note_name "
133141}
134142
143+ # shellcheck disable=SC2317
135144remove_note () {
136145 pushd " $notes_dir " > /dev/null || exit
137146 rm -i " $@ "
138147 popd > /dev/null || exit
139148}
140149
150+ # shellcheck disable=SC2317
141151trash_note () {
142152 pushd " $notes_dir " > /dev/null || exit
143153 trash-put -v " $@ "
144154 popd > /dev/null || exit
145155}
146156
157+ # shellcheck disable=SC2317
147158handle_multiple_notes () {
148159 local cmd=$1
149160
@@ -157,6 +168,7 @@ handle_multiple_notes() {
157168 fi
158169}
159170
171+ # shellcheck disable=SC2317
160172get_full_note_path () {
161173 local note_path=$1
162174
@@ -170,6 +182,7 @@ get_full_note_path() {
170182 echo " $note_path "
171183}
172184
185+ # shellcheck disable=SC2317
173186open_note () {
174187 local note_path=$1
175188
@@ -190,6 +203,7 @@ open_note() {
190203
191204}
192205
206+ # shellcheck disable=SC2317
193207cat_note () {
194208 local note_path=$1
195209
0 commit comments