From b0646588370d1e4aba15cd2bce0506971d654b15 Mon Sep 17 00:00:00 2001 From: Sina Siadat Date: Thu, 7 May 2015 13:19:59 +0430 Subject: [PATCH] README: shell syntax highlighting --- README.md | 70 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index de527f2..a217345 100644 --- a/README.md +++ b/README.md @@ -8,57 +8,61 @@ eton is a note-taking cli tool. ## Examples - # display the help message - eton -h +```shell +# display the help message +eton -h - # quick add - eton new '[ ] do something' +# quick add +eton new '[ ] do something' - # edit the last item - eton edit +# edit the last item +eton edit - # add text from STDIN - ps aux | eton new - +# add text from STDIN +ps aux | eton new - - # add a file - eton addfile file.txt +# add a file +eton addfile file.txt - # a unique alias can be set and used instead of the numeric id - eton alias 2 all-processes +# a unique alias can be set and used instead of the numeric id +eton alias 2 all-processes - # the order of id and alias does not matter - eton alias all-processes 2 +# the order of id and alias does not matter +eton alias all-processes 2 - # you can rename an alias - eton alias all-processes processes +# you can rename an alias +eton alias all-processes processes - # list all items - eton ls -Lall +# list all items +eton ls -Lall - # filter items containing words "thing" AND "some" - eton ls thing some +# filter items containing words "thing" AND "some" +eton ls thing some - # you can mark specific items - eton mark processes 1 +# you can mark specific items +eton mark processes 1 - # only list marked items (short mode) - eton ls -s +# only list marked items (short mode) +eton ls -s - # open an item in less - eton show processes +# open an item in less +eton show processes - # edit items - eton edit {1..3} 4 prcs +# edit items +eton edit {1..3} 4 prcs - # alias matching is fuzzy - eton cat prcs +# alias matching is fuzzy +eton cat prcs - # pass items to xargs as filenames: - eton ls something -l |xargs -i less {} +# pass items to xargs as filenames: +eton ls something -l |xargs -i less {} +``` Notes are stored in ~/.etondb - echo 'SELECT * FROM attributes LIMIT 10;' |sqlite3 ~/.etondb +```shell +echo 'SELECT * FROM attributes LIMIT 10;' |sqlite3 ~/.etondb +``` Set `$EDITOR` environment variable to edit notes in your prefered editor, e.g., `export EDITOR=vim`.