From 8ed4f97d64395bb89d4f860e318f9470cf55a892 Mon Sep 17 00:00:00 2001 From: Sung Won Cho Date: Tue, 1 Jan 2019 15:02:58 +1100 Subject: [PATCH] Document find (#150) --- COMMANDS.md | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/COMMANDS.md b/COMMANDS.md index e7e5e254..e0035f02 100644 --- a/COMMANDS.md +++ b/COMMANDS.md @@ -4,6 +4,7 @@ - [view](#dnote-view) - [edit](#dnote-edit) - [remove](#dnote-remove) +- [find](#dnote-find) - [login](#dnote-login) - [sync](#dnote-sync) @@ -15,10 +16,10 @@ Add a new note to a book. ```bash # Launch a text editor to add a new note to the specified book. -$ dnote add linux +dnote add linux # Write a new note with a content to the specified book. -$ dnote add linux -c "find - recursively walk the directory" +dnote add linux -c "find - recursively walk the directory" ``` ## dnote view @@ -30,13 +31,13 @@ _alias: v_ ```bash # List all books. -$ dnote view +dnote view # List all notes in a book. -$ dnote view golang +dnote view golang # See details of a note -$ dnote view golang 12 +dnote view golang 12 ``` ## dnote edit @@ -47,10 +48,10 @@ Edit a note ```bash # Launch a text editor to edit a note with the given index. -$ dnote edit linux 1 +dnote edit linux 1 # Edit a note with the given index in the specified book with a content. -$ dnote edit linux 1 -c "New Content" +dnote edit linux 1 -c "New Content" ``` ## dnote remove @@ -61,10 +62,27 @@ Remove either a note or a book ```bash # Remove the note with `index` in the specified book. -$ dnote remove JS 1 +dnote remove JS 1 # Remove the book with the `book name`. -$ dnote remove -b JS +dnote remove -b JS +``` + +## dnote find + +_alias: f + +Find notes by keywords + +```bash +# find notes by a keyword +dnote find rpoplpush + +# find notes by multiple keywords +dnote find "building a heap" + +# find notes within a book +dnote find "merge sort" -b algorithm ``` ## dnote sync