From bfb42d3732a920d668979a4fd125bb4528f18252 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Thu, 31 Jan 2013 15:27:21 -0800 Subject: [PATCH] Rename commands and add short forms --- note | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/note b/note index 3f1e59e..1946a73 100755 --- a/note +++ b/note @@ -107,16 +107,17 @@ Usage: note Commands -------- +You can use the first letter of each command as a shortcut key. Command Usage ------- ----- new Follow this with the note name to create a new note edit Follow this with the note name to edit an existing note + show Follow this with the note name to display an existing note delete Follow this with the note name to delete a note - list Prints the list of available notes - history Displays the note history - find Finds all notes with the specified keyword in the filename - search Finds all notes with the specified keyword in the text + find Prints the list of available notes + log Displays the note history + grep Finds all notes with the specified keyword in the text init Run this the very first time to set up the folders help Prints this help message version Prints the version information @@ -274,43 +275,43 @@ parse_args() { note_arg="$*" case "$note_cmd" in - "help") + "h" | "help") help_cmd ;; - "new") + "n" | "new") note_new ;; - "edit") + "e" | "edit") note_edit ;; - "show") + "s" | "show") note_show ;; - "del" | "delete") + "d" | "delete") note_delete ;; - "hist"|"history") + "l" | "log") note_history ;; - "init") + "i" | "init") notes_init ;; - "list" | "find") + "f" | "find") note_list $1 ;; - "search") + "g" | "grep") note_search $1 ;; - "ver" | "version") + "v" | "version") version_info ;;