danix
's git repository
home
/
my projects
/
bash-notes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da52e73
)
fixed issue that prevented the script from reading input from command line.
author
danix
<danix@danix.xyz>
Wed, 26 Apr 2023 14:02:40 +0000
(16:02 +0200)
committer
danix
<danix@danix.xyz>
Wed, 26 Apr 2023 14:02:40 +0000
(16:02 +0200)
SOURCE/main.sh
patch
|
blob
|
blame
|
history
notes.sh
patch
|
blob
|
blame
|
history
diff --git
a/SOURCE/main.sh
b/SOURCE/main.sh
index
18bebdf
..
6198adb
100644
(file)
--- a/
SOURCE/main.sh
+++ b/
SOURCE/main.sh
@@
-27,26
+27,31
@@
while true; do
exit
;;
-a | --add )
+ TITLE=$2
shift 2
addnote "$TITLE"
exit
;;
-e | --edit )
+ NOTE=$2
shift 2
editnote "$NOTE"
exit
;;
-d | --delete )
+ NOTE=$2
shift 2
rmnote "$NOTE"
exit
;;
-s | --show )
+ NOTE=$2
shift 2
shownote "$NOTE"
exit
;;
-r | --restore )
+ RDIR=$2
shift 2
backup_restore $RDIR
exit
@@
-69,6
+74,7
@@
while true; do
exit
;;
--backup )
+ BDIR=$2
shift 2
backup_data $BDIR
exit
diff --git
a/notes.sh
b/notes.sh
index
232effa
..
87b8a77
100755
(executable)
--- a/
notes.sh
+++ b/
notes.sh
@@
-640,26
+640,31
@@
while true; do
exit
;;
-a | --add )
+ TITLE=$2
shift 2
addnote "$TITLE"
exit
;;
-e | --edit )
+ NOTE=$2
shift 2
editnote "$NOTE"
exit
;;
-d | --delete )
+ NOTE=$2
shift 2
rmnote "$NOTE"
exit
;;
-s | --show )
+ NOTE=$2
shift 2
shownote "$NOTE"
exit
;;
-r | --restore )
+ RDIR=$2
shift 2
backup_restore $RDIR
exit
@@
-682,6
+687,7
@@
while true; do
exit
;;
--backup )
+ BDIR=$2
shift 2
backup_data $BDIR
exit