File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,7 @@ Renames a given note to destination or moves the note to directory. Name can be
147147Removes the given note if it exists. If ` -r ` or ` --recursive ` is given, deletes the folders/notes recursively.
148148
149149### ` notes cat <note-name> `
150-
151- Displays the note
150+ Displays the note. Shorthand alias also available with ` notes c ` .
152151
153152### ` notes grep/find <pattern> | notes open `
154153
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ Usage:
294294 $name append|a <name> [message] # Appends a note. Will use stdin if no message is given
295295 $name mv <source> <dest>|<directory> # Rename a note, or move a note when a directory is given
296296 $name rm [-r | --recursive] <name> # Remove note, or folder if -r or --recursive is given
297- $name cat <name> # Display note
297+ $name cat|c <name> # Display note
298298 echo <name> | $name open|o # Open all note filenames piped in
299299 echo <name> | $name cat # Display all note filenames piped in
300300 $name --help # Print this usage information
@@ -358,7 +358,7 @@ main() {
358358 cmd=" remove_note"
359359 modified=1
360360 ;;
361- " cat" )
361+ " cat" | " c " )
362362 cmd=" handle_multiple_notes cat"
363363 ;;
364364 --help | -help | -h )
Original file line number Diff line number Diff line change @@ -21,6 +21,15 @@ notes="./notes"
2121 assert_output $' line1\n line2'
2222}
2323
24+ @test " Should show created note when using the cat shorthand alias" {
25+ echo line1 >> " $NOTES_DIRECTORY /note.md"
26+ echo line2 >> " $NOTES_DIRECTORY /note.md"
27+ run $notes c note.md
28+
29+ assert_success
30+ assert_output $' line1\n line2'
31+ }
32+
2433@test " Accepts names without .md to show" {
2534 echo line1 >> " $NOTES_DIRECTORY /note.md"
2635 echo line2 >> " $NOTES_DIRECTORY /note.md"
You can’t perform that action at this time.
0 commit comments