Slight documentation tweaks
This commit is contained in:
@@ -16,12 +16,14 @@ but instead could use the tools already provided by the operating system.
|
|||||||
|
|
||||||
usage: vns [-cedlp] <notebook/section/name>
|
usage: vns [-cedlp] <notebook/section/name>
|
||||||
vns [-hi]
|
vns [-hi]
|
||||||
|
vns git ...
|
||||||
|
|
||||||
-c | --create : Create note
|
-c | --create : Create note
|
||||||
-d | --delete : Delete note
|
-d | --delete : Delete note
|
||||||
-e | --edit : Open note for editing
|
-e | --edit : Open note for editing
|
||||||
-h | --help : Display this message
|
-h | --help : Display this message
|
||||||
-i | --init : Write default config and initalize VNS store"
|
-i | --init : Initialize note store"
|
||||||
-l | --list : List all notes in NOTEBOOK
|
-l | --list : List all notes in <notebook>
|
||||||
-p | --print : Print note to console
|
-p | --print : Print note to console
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|||||||
13
vns
13
vns
@@ -99,8 +99,8 @@ vns_printHelp (){
|
|||||||
printf "\n%s" " -d | --delete : Delete note"
|
printf "\n%s" " -d | --delete : Delete note"
|
||||||
printf "\n%s" " -e | --edit : Open note for editing"
|
printf "\n%s" " -e | --edit : Open note for editing"
|
||||||
printf "\n%s" " -h | --help : Display this message"
|
printf "\n%s" " -h | --help : Display this message"
|
||||||
printf "\n%s" " -i | --init : Write default config and initalize VNS store"
|
printf "\n%s" " -i | --init : Initialize note store"
|
||||||
printf "\n%s" " -l | --list : List all notes in NOTEBOOK"
|
printf "\n%s" " -l | --list : List all notes in <notebook>"
|
||||||
printf "\n%s" " -p | --print : Print note to console"
|
printf "\n%s" " -p | --print : Print note to console"
|
||||||
printf "\n\n"
|
printf "\n\n"
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ vns_rm () {
|
|||||||
vns_create () {
|
vns_create () {
|
||||||
|
|
||||||
# create (note)
|
# create (note)
|
||||||
# Edit a previously non-existant note
|
# Create a new note and open it for editing
|
||||||
|
|
||||||
# Verify $1 is bound
|
# Verify $1 is bound
|
||||||
if [ -z "${*:1:1}" ]; then vns_raise "Insufficient arguments" 11; fi
|
if [ -z "${*:1:1}" ]; then vns_raise "Insufficient arguments" 11; fi
|
||||||
@@ -186,12 +186,12 @@ vns_create () {
|
|||||||
vns_edit () {
|
vns_edit () {
|
||||||
|
|
||||||
# edit (note)
|
# edit (note)
|
||||||
# edit (note) in the store
|
# Open (note) for editing in Vim
|
||||||
|
|
||||||
# Verify $1 is bound
|
# Verify $1 is bound
|
||||||
if [ -z "${*:1:1}" ]; then vns_raise "Insufficient arguments" 11; fi
|
if [ -z "${*:1:1}" ]; then vns_raise "Insufficient arguments" 11; fi
|
||||||
|
|
||||||
# Refuse to edit non-existant notes
|
# Refuse to edit non-existent notes
|
||||||
if [ ! -r "$VNS_STORE/$1.gpg" ]; then vns_raise "Note not found: $1" 41; fi
|
if [ ! -r "$VNS_STORE/$1.gpg" ]; then vns_raise "Note not found: $1" 41; fi
|
||||||
|
|
||||||
# Edit the specified note
|
# Edit the specified note
|
||||||
@@ -245,9 +245,6 @@ vns () {
|
|||||||
"${ACTIONS["$1"]}" "${@:2}"
|
"${ACTIONS["$1"]}" "${@:2}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Print an extra newline just in case
|
|
||||||
# printf "\n";
|
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user