be70a0624287ea6c810a08b234db0459430c1615
1 # shellcheck disable=SC2006
2 GOPT
=$
(getopt
-o hvplr
::a
::e
::d
::s
:: --long help,version
,list
,plain
,userconf
,restore
::,backup
::,add
::,edit
::,delete
::,show
:: -n 'bash-notes' -- "$@")
4 # shellcheck disable=SC2181
5 if [ $?
!= 0 ] ; then helptext
>&2 ; exit 1 ; fi
7 # Note the quotes around `$GOPT': they are essential!
18 echo $BASENAME v
${VERSION}
32 read -r -p "Title: " TITLE
45 read -r -p "Note ID: " NOTE
58 read -r -p "Note ID: " NOTE
71 read -r -p "Note ID: " NOTE
84 read -r -p "Backup Dir: " RDIR
96 # shellcheck disable=SC2317
97 echo "config exported to \"$RCFILE\""
98 # shellcheck disable=SC2317
104 read -r -p "Backup Dir: " BDIR
125 if [ $
(check_noteID
$arg) ]; then