aboutsummaryrefslogtreecommitdiffstats
path: root/SOURCE
diff options
context:
space:
mode:
authordanix <danix@danix.xyz>2023-04-07 11:01:14 +0200
committerdanix <danix@danix.xyz>2023-04-07 11:01:14 +0200
commitefa3e6079384bc77f194081dff89361e4eda87b2 (patch)
tree181acb9c19a51a10765e76ff631208b7900ae9ef /SOURCE
parent3951cc3d829d51e8cd3de200612477f0548520c2 (diff)
downloadbash-notes-efa3e6079384bc77f194081dff89361e4eda87b2.tar.gz
bash-notes-efa3e6079384bc77f194081dff89361e4eda87b2.zip
backups management. Some UX improvementsv0.3
Diffstat (limited to 'SOURCE')
-rw-r--r--SOURCE/CORE/helpers.sh3
-rw-r--r--SOURCE/main.sh9
2 files changed, 11 insertions, 1 deletions
diff --git a/SOURCE/CORE/helpers.sh b/SOURCE/CORE/helpers.sh
index f697c07..565413d 100644
--- a/SOURCE/CORE/helpers.sh
+++ b/SOURCE/CORE/helpers.sh
@@ -13,7 +13,7 @@ function check_noteID() {
function helptext() {
echo "Usage:"
- echo " $0 [PARAMS] ..."
+ echo " $0 [PARAMS] [note ID]..."
echo ""
echo "${BASENAME} parameters are:"
echo -e " -h | --help\t\t\t: This help text"
@@ -30,6 +30,7 @@ function helptext() {
echo -e " --userconf\t\t\t: Export User config file"
echo -e " --backup [<dest>]\t\t: Backup your data in your destination folder"
echo ""
+ echo -e "if a non option is passed and is a valid note ID, the note will be displayed."
}
function configtext() {
diff --git a/SOURCE/main.sh b/SOURCE/main.sh
index 476243b..be70a06 100644
--- a/SOURCE/main.sh
+++ b/SOURCE/main.sh
@@ -120,3 +120,12 @@ while true; do
;;
esac
done
+
+for arg; do
+ if [ $(check_noteID $arg) ]; then
+ shownote $arg
+ else
+ helptext
+ exit
+ fi
+done