File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ search_filenames_and_contents() {
6262 find_output=$( find " $notes_dir " -type f)
6363 fi
6464 find_result=$?
65- formatted_output=$( printf " $find_output " | without_notes_dir)
65+ formatted_output=$( printf " $find_output " | without_notes_dir | sort )
6666
6767 if [[ $find_result == 0 && " $formatted_output " ]]; then
6868 printf " $formatted_output \n"
@@ -75,7 +75,7 @@ search_filenames_and_contents() {
7575find_notes () {
7676 local find_output=$( find " $notes_dir " -ipath " $notes_dir /*$* *" -type f 2>&1 )
7777 local find_result=$?
78- local formatted_output=$( printf " $find_output " | without_notes_dir)
78+ local formatted_output=$( printf " $find_output " | without_notes_dir | sort )
7979
8080 if [[ $find_result == 0 && " $formatted_output " ]]; then
8181 printf " $formatted_output \n"
@@ -93,7 +93,7 @@ grep_notes() {
9393
9494 local grep_output=$( grep -r " $notes_dir " -li -e " $* " 2>&1 )
9595 local grep_result=$?
96- local formatted_output=$( printf " $grep_output " | without_notes_dir)
96+ local formatted_output=$( printf " $grep_output " | without_notes_dir | sort )
9797
9898 if [[ $grep_result == 0 && " $formatted_output " ]]; then
9999 printf " $formatted_output \n"
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ notes="./notes"
5656}
5757
5858@test " Show multiple files passed by pipe from find" {
59- echo line1 >> " $NOTES_DIRECTORY /note .md"
59+ echo line1 >> " $NOTES_DIRECTORY /note1 .md"
6060 echo line2 >> " $NOTES_DIRECTORY /note2.md"
6161
6262 run bash -c " $notes find | $notes cat"
You can’t perform that action at this time.
0 commit comments