Skip to content

Commit ed671a2

Browse files
committed
Staging for merge
1 parent 2c8fce9 commit ed671a2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

notes

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ ls_notes() {
3131
}
3232

3333
find_notes() {
34-
find_output=$(find "$notes_dir" -ipath "$notes_dir/*$**" -type f 2>&1)
35-
find_result=$?
36-
formatted_output=$(printf "$find_output" | without_notes_dir)
34+
local find_output=$(find "$notes_dir" -ipath "$notes_dir/*$**" -type f 2>&1)
35+
local find_result=$?
36+
local formatted_output=$(printf "$find_output" | without_notes_dir)
3737

3838
if [[ $find_result == 0 && "$formatted_output" ]]; then
3939
printf "$formatted_output\n"
@@ -49,9 +49,9 @@ grep_notes() {
4949
return 1
5050
fi
5151

52-
grep_output=$(grep -r "$notes_dir" -li -e "$*" 2>&1)
53-
grep_result=$?
54-
formatted_output=$(printf "$grep_output" | without_notes_dir)
52+
local grep_output=$(grep -r "$notes_dir" -li -e "$*" 2>&1)
53+
local grep_result=$?
54+
local formatted_output=$(printf "$grep_output" | without_notes_dir)
5555

5656
if [[ $grep_result == 0 && "$formatted_output" ]]; then
5757
printf "$formatted_output\n"
@@ -62,7 +62,7 @@ grep_notes() {
6262
}
6363

6464
new_note() {
65-
note_name="$*"
65+
local note_name="$*"
6666
mkdir -p "$(dirname "$notes_dir/$note_name")"
6767
open_note "$note_name.md"
6868
}
@@ -97,7 +97,7 @@ open_something() {
9797
}
9898

9999
open_note() {
100-
note_path=$1
100+
local note_path=$1
101101

102102
if [[ "$note_path" != *.md ]]; then
103103
note_path="$note_path.md"
@@ -136,8 +136,8 @@ EOF
136136
}
137137

138138
main() {
139-
ret=0
140-
cmd=""
139+
local ret=0
140+
local cmd=""
141141

142142
if [ -z "$1" ]; then
143143
printf "No command specified\n\n"

0 commit comments

Comments
 (0)