Skip to content

Commit 3b8f995

Browse files
committed
added code to replace spaces with _
1 parent bc07860 commit 3b8f995

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

notes

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ validate_gpg_keyid () {
133133

134134
}
135135

136-
recrypt_file () {
136+
recrypt_file () { ## not used
137137
newkey = "$1"
138138
target = "$2"
139139

@@ -254,6 +254,7 @@ note_rename () {
254254
shift
255255
notefile="$USE_POINTER/$@"
256256
read -p "Please enter new name for note: " newname
257+
newname="${newname// /_}"
257258

258259
case $notefile in
259260
*gpg) skip;;
@@ -324,6 +325,7 @@ notebook_rename () {
324325

325326
notebook="$NOTESDIR/$@"
326327
read -p "Please enter new name for note: " newname
328+
newname="${newname// /_}"
327329
newnotebook="${NOTESDIR}/${newname}"
328330

329331
case $MVCP in
@@ -421,6 +423,7 @@ cmd_find () {
421423

422424
cmd_insert () {
423425
myoptions="$@"
426+
myoptions="${myoptions// /_}"
424427
case $PROGRAM in
425428
"notes") echo my options = ${myoptions} ; note_add $myoptions;;
426429
"notebook") notebook_add $myoptions;;
@@ -429,6 +432,7 @@ cmd_insert () {
429432

430433
cmd_import () {
431434
myoptions="$@"
435+
myoptions="${myoptions// /_}"
432436
case $PROGRAM in
433437
"notes") echo my options = ${myoptions} ; note_import $myoptions;;
434438
"notebook") cmd_usage;;
@@ -457,6 +461,7 @@ cmd_edit () {
457461

458462
cmd_copy_move () {
459463
myoptions="$@"
464+
myoptions="${myoptions// /_}"
460465
case $PROGRAM in
461466
"notes") echo my options = ${myoptions} ; note_rename $myoptions;;
462467
"notebook") notebook_rename $myoptions;;

0 commit comments

Comments
 (0)