File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ ls_notes() {
26
26
}
27
27
28
28
find_notes () {
29
- find_output=$( find " $notes_dir " -ipath " $notes_dir /*$* *" -type f 2>&1 )
30
- find_result=$?
31
- formatted_output=$( printf " $find_output " | without_notes_dir)
29
+ local find_output=$( find " $notes_dir " -ipath " $notes_dir /*$* *" -type f 2>&1 )
30
+ local find_result=$?
31
+ local formatted_output=$( printf " $find_output " | without_notes_dir)
32
32
33
33
if [[ $find_result == 0 && " $formatted_output " ]]; then
34
34
printf " $formatted_output \n"
@@ -44,9 +44,9 @@ grep_notes() {
44
44
return 1
45
45
fi
46
46
47
- grep_output=$( grep -r " $notes_dir " -li -e " $* " 2>&1 )
48
- grep_result=$?
49
- formatted_output=$( printf " $grep_output " | without_notes_dir)
47
+ local grep_output=$( grep -r " $notes_dir " -li -e " $* " 2>&1 )
48
+ local grep_result=$?
49
+ local formatted_output=$( printf " $grep_output " | without_notes_dir)
50
50
51
51
if [[ $grep_result == 0 && " $formatted_output " ]]; then
52
52
printf " $formatted_output \n"
@@ -57,7 +57,7 @@ grep_notes() {
57
57
}
58
58
59
59
new_note () {
60
- note_name=" $* "
60
+ local note_name=" $* "
61
61
mkdir -p " $( dirname " $notes_dir /$note_name " ) "
62
62
open_note " $note_name .md"
63
63
}
@@ -92,7 +92,7 @@ open_something() {
92
92
}
93
93
94
94
open_note () {
95
- note_path=$1
95
+ local note_path=$1
96
96
97
97
if [[ " $note_path " != * .md ]]; then
98
98
note_path=" $note_path .md"
131
131
}
132
132
133
133
main () {
134
- ret=0
135
- cmd=" "
134
+ local ret=0
135
+ local cmd=" "
136
136
137
137
if [ -z " $1 " ]; then
138
138
printf " No command specified\n\n"
You can’t perform that action at this time.
0 commit comments