@@ -8,8 +8,6 @@ _normal=`tput sgr0`
88_glob=" @"
99name=notes
1010
11-
12-
1311# directories and imports
1412# --------------------------------------------------
1513
@@ -33,7 +31,6 @@ source "${rootdir}/_helpers/helpers.sh"
3331cd " ${_dir} " 2> /dev/null; dir=` pwd -P` ; cd " ${dir} "
3432
3533
36-
3734# main program logic
3835# --------------------------------------------------
3936optstring=" :Cd:f:F:him:n:N:Op:Pr:R:"
@@ -72,13 +69,11 @@ while getopts "$optstring" opt; do
7269 esac
7370done
7471
75-
7672# prompt user to enter valid notes directory, and update _config/env.sh
7773if [[ ! -d " ${_dir} " ]] || [[ ! " ${_dir} " = /* ]]; then
7874 setdir " ${_dir} "
7975fi
8076
81-
8277# reset options index
8378OPTIND=1
8479# parse options and arguments
@@ -192,16 +187,13 @@ while getopts "$optstring" opt; do
192187 esac
193188done
194189
195-
196-
197190# list all notes (if no args are passed)
198191# ------------------------------
199192if [ -z " $1 " ]; then
200193 previewnotes .
201194 exit 0
202195fi
203196
204-
205197# open note, or list all notes within subdirectory (if one arg is passed)
206198# ------------------------------
207199if [ -z " $2 " ]; then
@@ -219,7 +211,6 @@ if [ -z "$2" ]; then
219211 exit 0
220212fi
221213
222-
223214# pass note or directory as argument to another program (if two args are passed)
224215# ------------------------------
225216checkexec ` echo $1 | awk ' { print $1; }' ` # make sure first argument is an executable
@@ -252,7 +243,6 @@ if [ -z "$3" ]; then
252243 exit $?
253244fi
254245
255-
256246# pass notes as arguments to another program (if more than two args are passed)
257247# ------------------------------
258248program=$1
0 commit comments