File tree 3 files changed +12
-4
lines changed
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
147
147
Removes the given note if it exists. If ` -r ` or ` --recursive ` is given, deletes the folders/notes recursively.
148
148
149
149
### ` notes cat <note-name> `
150
-
151
- Displays the note
150
+ Displays the note. Shorthand alias also available with ` notes c ` .
152
151
153
152
### ` notes grep/find <pattern> | notes open `
154
153
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ Usage:
294
294
$name append|a <name> [message] # Appends a note. Will use stdin if no message is given
295
295
$name mv <source> <dest>|<directory> # Rename a note, or move a note when a directory is given
296
296
$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
298
298
echo <name> | $name open|o # Open all note filenames piped in
299
299
echo <name> | $name cat # Display all note filenames piped in
300
300
$name --help # Print this usage information
@@ -358,7 +358,7 @@ main() {
358
358
cmd=" remove_note"
359
359
modified=1
360
360
;;
361
- " cat" )
361
+ " cat" | " c " )
362
362
cmd=" handle_multiple_notes cat"
363
363
;;
364
364
--help | -help | -h )
Original file line number Diff line number Diff line change @@ -21,6 +21,15 @@ notes="./notes"
21
21
assert_output $' line1\n line2'
22
22
}
23
23
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
+
24
33
@test " Accepts names without .md to show" {
25
34
echo line1 >> " $NOTES_DIRECTORY /note.md"
26
35
echo line2 >> " $NOTES_DIRECTORY /note.md"
You can’t perform that action at this time.
0 commit comments