removed the 'function' keyword before declaring a function as is not needed.
authordanix <danix@danix.xyz>
Fri, 14 Apr 2023 07:32:15 +0000 (09:32 +0200)
committerdanix <danix@danix.xyz>
Fri, 14 Apr 2023 07:32:15 +0000 (09:32 +0200)
SOURCE/CORE/core-add.sh
SOURCE/CORE/core-backup.sh
SOURCE/CORE/core-edit.sh
SOURCE/CORE/core-list.sh
SOURCE/CORE/core-remove.sh
SOURCE/CORE/core-show.sh
SOURCE/CORE/helpers.sh
SOURCE/head.sh

index ed6256c..1c71bbb 100644 (file)
@@ -1,4 +1,4 @@
-function addnote() {
+addnote() {
        # remove eventually existing temp DB file
        if [[ -f $TMPDB ]]; then
                rm $TMPDB
index 25f67c9..7a0b6d1 100644 (file)
@@ -1,4 +1,4 @@
-function backup_data() {
+backup_data() {
        BACKUPDIR="$1"
     echo "backing up data in $BACKUPDIR"
 
@@ -39,7 +39,7 @@ function backup_data() {
        fi
 }
 
-function backup_restore() {
+backup_restore() {
        BACKUPDIR="$1"
        echo "restoring backup from $BACKUPDIR"
        echo "This will overwrite all your notes and configurations with the backup."
index c42e63d..20765f1 100644 (file)
@@ -1,4 +1,4 @@
-function editnote() {
+editnote() {
        NOTE=$1
        # shellcheck disable=SC2155
        local OK=$(check_noteID "$NOTE")
index 0580df3..17349cd 100644 (file)
@@ -1,4 +1,4 @@
-function listnotes() {
+listnotes() {
        # [ $PLAIN == true ] && echo "output is plain text" || echo "output is colored"
        if [[ $(ls -A "$NOTESDIR") ]]; then
                if [ $PLAIN == false ]; then
index 0111d0f..7bbf8c4 100644 (file)
@@ -1,4 +1,4 @@
-function rmnote() {
+rmnote() {
        # remove eventually existing temp DB file
        if [[ -f $TMPDB ]]; then
                rm $TMPDB
index 1a04c82..ac02c6b 100644 (file)
@@ -1,4 +1,4 @@
-function shownote() {
+shownote() {
        NOTE=$1
 
        # shellcheck disable=SC2155
index 567846b..b7b9180 100644 (file)
@@ -1,5 +1,5 @@
 # check if input is a number, returns false or the number itself
-function check_noteID() {
+check_noteID() {
        IN=$1
        case $IN in
                ''|*[!0-9]*)
@@ -11,7 +11,7 @@ function check_noteID() {
        esac
 }
 
-function helptext() {
+helptext() {
     echo "Usage:"
     echo "  $0 [PARAMS] [note ID]..."
        echo ""
@@ -33,7 +33,7 @@ function helptext() {
     echo -e "if a non option is passed and is a valid note ID, the note will be displayed."
 }
 
-function configtext() {
+configtext() {
     cat << __NOWCONF__ 
 ${BASENAME} configuration is:
 
@@ -52,7 +52,7 @@ __NOWCONF__
 }
 
 # this function returns a random 2 words title
-function random_title() {
+random_title() {
     # Constants 
     X=0
     DICT=/usr/share/dict/words
index d609726..7b684f1 100644 (file)
@@ -91,7 +91,7 @@ fi
 echo $PID > "$PIDFILE"
 
 # Export config to file
-function export_config() {
+export_config() {
        if [ -r ${RCFILE} ]; then
                echo "Backing up current '${RCFILE}'...."
                mv -f ${RCFILE} ${RCFILE}.$(date +%Y%m%d_%H%M)
@@ -112,7 +112,7 @@ function export_config() {
 
 # we should expand on this function to add a sample note and explain a little bit
 # how the program works.
-function firstrun() {
+firstrun() {
        [ -f $RCFILE ] && RC=$RCFILE || RC="none"
 
        clear