@@ -212,22 +212,23 @@ cat_note() {
212
212
}
213
213
214
214
usage () {
215
+ local name=$( basename $0 )
215
216
cat << EOF
216
- notes is a command line note taking tool.
217
+ $name is a command line note taking tool.
217
218
218
219
Usage:
219
- notes new|n <name> # Create a new note
220
- notes ls <pattern> # List notes by path
221
- notes find|f [pattern] # Search notes by filename and path
222
- notes grep|g <pattern> # Search notes by content
223
- notes search|s [pattern] # Search notes by filename or content
224
- notes open|o # Open your notes directory
225
- notes open|o <name> # Open a note for editing by full name
226
- notes rm [-r | --recursive] <name> # Remove note, or folder if -r or --recursive is given
227
- notes cat <name> # Display note
228
- echo <name> | notes open|o # Open all note filenames piped in
229
- echo <name> | notes cat # Display all note filenames piped in
230
- notes --help # Print this usage information
220
+ $name new|n <name> # Create a new note
221
+ $name ls <pattern> # List notes by path
222
+ $name find|f [pattern] # Search notes by filename and path
223
+ $name grep|g <pattern> # Search notes by content
224
+ $name search|s [pattern] # Search notes by filename or content
225
+ $name open|o # Open your notes directory
226
+ $name open|o <name> # Open a note for editing by full name
227
+ $name rm [-r | --recursive] <name> # Remove note, or folder if -r or --recursive is given
228
+ $name cat <name> # Display note
229
+ echo <name> | $name open|o # Open all note filenames piped in
230
+ echo <name> | $name cat # Display all note filenames piped in
231
+ $name --help # Print this usage information
231
232
232
233
'command|c' means you can use 'command' or the equivalent shorthand alias 'c'
233
234
0 commit comments