quotations around added items are now optional
parent
ad02baffb7
commit
db79a736a2
|
@ -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`
|
||||
|
||||
|
|
6
args.rkt
6
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
|
||||
|
|
5
util.rkt
5
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))))
|
||||
|
|
Loading…
Reference in New Issue