diff --git a/README.md b/README.md index 38c9ec6..91c6b42 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ Now the default directory and todo list file have better default permissions: # Todos -- Allow the use of unquoted items to be added if the user doesn't want/forgets to use them - Add color option to `config.rkt` file - Encrypt `todo.txt` file - Add note on `.bash_history` about items being added here before going into the `todo.txt` file @@ -141,8 +140,7 @@ The examples below assume that you have `rodo` [set up in your `$PATH`](https:// `rodo add "go to the park"` -**Note: If you leave out the double quotation marks here, only the first word -will be added. In the example above, only "go" would be added to the list.** +`rodo add this is a task without quotes` `rodo rm 1` diff --git a/args.rkt b/args.rkt index ad9a82c..4b70e39 100644 --- a/args.rkt +++ b/args.rkt @@ -23,7 +23,7 @@ ;; add [(and - (equal? args-length 2) + (or (equal? args-length 2) (>= args-length 2)) (equal? (vector-ref args 0) config:add-command)) (util:add-item args)] @@ -34,8 +34,8 @@ (real? (string->number (vector-ref args 1))) (positive? (string->number (vector-ref args 1))) (not (> (string->number (vector-ref args 1)) (length (util:file->string-list config:path)))) - (not (< (string->number (vector-ref args 1)) (car (list:range (length (util:file->string-list config:path)))))) - (util:remove-item args))] + (not (< (string->number (vector-ref args 1)) (car (list:range (length (util:file->string-list config:path))))))) + (util:remove-item args)] ;; init [(and diff --git a/util.rkt b/util.rkt index 5c7b301..79e746f 100644 --- a/util.rkt +++ b/util.rkt @@ -117,10 +117,7 @@ (if (and (check-for-directory) (check-for-file)) - ;; Todo: add rest of arguments to make double quotation - ;; marks optional if the user doesn't want/ - ;; forgets to use them - (add-item-to-file (vector-ref args 1)) + (add-item-to-file (string:string-join (vector->list args))) (begin (display-hash-ref messages:messages 'file-not-found) (display-hash-ref messages:messages 'try-init))))