Major reworking. Will bump alpha version when verified working

This commit is contained in:
Jon-William Lewis
2016-08-27 15:49:53 -05:00
parent 4966351673
commit 09d578fa05
5 changed files with 26 additions and 587 deletions

View File

@@ -106,15 +106,14 @@ else
ARGS=("${@}")
declare -i INDEX
INDEX=0
while getopts ":cCd:e:lp:hi" ARG $VCTL; do
for ARG in "$@"; do
let INDEX++
case "$ARG" in
c|--create)
NOTE="$ARGOPT" create
CREATE="TRUE"
OP="TRUE"
-c|--create)
NOTE="${ARGS[$INDEX]}" create
exit 0
;;
C|--config)
-C|--config)
if [ -z "$EDITOR" ]; then
printf "$YELLOW_COLOR!$RESET_COLOR - %s\n"\
"No editor defined. Defaulting to vi."
@@ -123,32 +122,33 @@ else
"$EDITOR" "$CONFIG_FILE"
exit 0;
;;
d|--delete)
NOTE="$ARGOPT" delete
DELETE="TRUE"
OP="TRUE"
-ce)
NOTE="${ARGS[$INDEX]}"
create
edit
exit 0
;;
e|--edit)
-d|--delete)
NOTE="${ARGS[$INDEX]}" delete
exit 0
;;
-e|--edit)
NOTE="${ARGS[$INDEX]}" edit
EDIT="TRUE"
OP="TRUE"
exit 0
;;
l|--list)
-l|--list)
NOTEBOOK="${ARGS[$INDEX]}" list
exit 0
LIST="TRUE"
OP="TRUE"
;;
p|--print)
-p|--print)
NOTE="${ARGS[$INDEX]}" print
PRINT="TRUE"
OP="TRUE"
exit 0
;;
h|--help)
-h|--help)
help
exit 0
;;
i|--init-store)
-i|--init-store)
init_store
exit 0
;;