aboutsummaryrefslogtreecommitdiffstats
path: root/notes.sh
diff options
context:
space:
mode:
Diffstat (limited to 'notes.sh')
-rwxr-xr-xnotes.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/notes.sh b/notes.sh
index 6c81615..8a9c082 100755
--- a/notes.sh
+++ b/notes.sh
@@ -161,7 +161,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"
@@ -178,6 +178,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() {
@@ -537,3 +538,12 @@ while true; do
;;
esac
done
+
+for arg; do
+ if [ $(check_noteID $arg) ]; then
+ shownote $arg
+ else
+ helptext
+ exit
+ fi
+done