Skip to content

Commit 5df2285

Browse files
committed
removed debugging echo's
1 parent 5809880 commit 5df2285

File tree

1 file changed

+13
-56
lines changed

1 file changed

+13
-56
lines changed

notes

Lines changed: 13 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ note-edit() {
153153
fi
154154
}
155155

156+
note-list() {
157+
ls "${USE_POINTER}" | column | more
158+
}
159+
156160
note-delete() {
157161
notefile="$USE_POINTER/$@"
158162

@@ -166,17 +170,9 @@ note-delete() {
166170
}
167171

168172
note-rename() {
169-
170-
echo argv = $@
171-
172173
MVCP="$1"
173174
shift
174-
175-
echo command = "$MVCP"
176-
echo argv now $@
177-
178175
notefile="$USE_POINTER/$@"
179-
180176
read -p "Please enter new name for note: " newname
181177

182178
case $notefile in
@@ -190,10 +186,6 @@ note-rename() {
190186
*) newnotefile="${newnotefile}.gpg"
191187
esac
192188

193-
echo old notefile $notefile
194-
echo new notefile $newnotefile
195-
196-
197189
case $MVCP in
198190
"cp") processing="copying ";;
199191
"mv") processing="moving ";;
@@ -215,11 +207,7 @@ note-rename() {
215207
#
216208

217209
notebook-add() {
218-
219210
new_notebook="${NOTESDIR}/$@"
220-
221-
echo $new_notebook
222-
223211
if [ ! -d "$new_notebook" ] ; then
224212
mkdir "$new_notebook"
225213
chmod 700 "$new_notebook"
@@ -230,15 +218,12 @@ notebook-add() {
230218
}
231219

232220
notebook-delete() {
233-
234221
notebook="${NOTESDIR}/$@"
235-
236222
if [ ! -d "${notebook}" ] ; then
237223
echo Error: Notebook \'$notebook\' does not exist
238224
exit 1
239225
else
240226
echo Deleting files from $notebook
241-
242227
rm -i ${notebook}/*.gpg
243228

244229
if [ $? = 0 ] ; then
@@ -250,27 +235,17 @@ notebook-delete() {
250235
}
251236

252237
notebook-rename() {
253-
254-
echo argv = $@
255-
256238
MVCP="$1"
257239
shift
258240

259241
if [ "$MVCP" = "cp" ] ; then
260242
MVCP="cp -r "
261243
fi
262244

263-
echo command = "$MVCP"
264-
echo argv now $@
265-
266245
notebook="$NOTESDIR/$@"
267-
268246
read -p "Please enter new name for note: " newname
269247
newnotebook="${NOTESDIR}/${newname}"
270248

271-
echo old notebook $notebook
272-
echo new notebook $newnotebook
273-
274249
case $MVCP in
275250
"cp") processing="copying ";;
276251
"mv") processing="moving ";;
@@ -284,18 +259,19 @@ notebook-rename() {
284259
fi
285260
}
286261

262+
notebook-list () {
263+
ls "${NOTESDIR}" | sed 's/DEFAULT//; s/USE//; s/config//' | column | more
264+
}
265+
287266
#
288267
# OTHER COMMANDS
289268
#
290269

291270
cmd_extension_or_show () {
292-
echo inside cmd_extension_or_show
293-
294271
cmd_usage
295272
}
296273

297274
cmd_usage () {
298-
echo cmd_usage
299275
cat << ENDHELP
300276
301277
Standard (?) Unix Notes system
@@ -332,9 +308,6 @@ NOTEBOOK MANAGEMENT:
332308
notebook copy|cp notebook copy a notebook (will prompt for new name)
333309
notebook delete|rm notebook delete a notebook
334310
335-
336-
337-
338311
ENDHELP
339312
}
340313

@@ -343,43 +316,39 @@ cmd_version () {
343316
}
344317

345318
cmd_view () {
346-
347319
myoptions="$@"
348-
349320
if [ "$1" = "" ]; then
350321
echo No note specified on command line
351322
exit 1
352323
fi
353-
354324
case $PROGRAM in
355-
356325
"notes") note-view $myoptions;;
357326
"notebook") cmd_usage;;
358327
esac
359328
}
360329

361330
cmd_show () {
362-
echo cmd_show
331+
myoptions="$@"
332+
case $PROGRAM in
333+
"notes") note-list $myoptions;;
334+
"notebook") notebook-list $myoptions;;
335+
esac
363336
}
364337

365338
cmd_find () {
366339
echo cmd_find
367340
}
368341

369342
cmd_insert () {
370-
371343
myoptions="$@"
372-
373344
case $PROGRAM in
374-
375345
"notes") echo my options = ${myoptions} ; note-add $myoptions;;
376346
"notebook") notebook-add $myoptions;;
377347
esac
378348
}
379349

380350
cmd_import () {
381351
myoptions="$@"
382-
383352
case $PROGRAM in
384353
"notes") echo my options = ${myoptions} ; note-import $myoptions;;
385354
"notebook") cmd_usage;;
@@ -392,28 +361,22 @@ cmd_generate () {
392361

393362
cmd_delete () {
394363
myoptions="$@"
395-
396364
case $PROGRAM in
397365
"notes") echo my options = ${myoptions} ; note-delete $myoptions;;
398366
"notebook") notebook-delete $myoptions;;
399367
esac
400368
}
401369

402370
cmd_edit () {
403-
echo cmd_edit
404371
myoptions="$@"
405-
406372
case $PROGRAM in
407373
"notes") echo my options = ${myoptions} ; note-edit $myoptions;;
408374
"notebook") notebook-edit $myoptions;;
409375
esac
410376
}
411377

412378
cmd_copy_move () {
413-
echo cmd_copy_move
414379
myoptions="$@"
415-
echo myoptions = $myoptions
416-
417380
case $PROGRAM in
418381
"notes") echo my options = ${myoptions} ; note-rename $myoptions;;
419382
"notebook") notebook-rename $myoptions;;
@@ -438,8 +401,6 @@ cmd_newkey () {
438401
# #
439402
#########################
440403

441-
442-
443404
PROGRAM="${0##*/}"
444405
COMMAND="$1"
445406

@@ -465,7 +426,3 @@ esac
465426
exit 0
466427

467428

468-
469-
470-
471-

0 commit comments

Comments
 (0)