wow that was a bad bug
parent
4b575c355d
commit
be6c36d3d3
BIN
nicethings
BIN
nicethings
Binary file not shown.
|
@ -183,8 +183,8 @@
|
|||
;; ------------------------------------------------
|
||||
;; rm
|
||||
;; ------------------------------------------------
|
||||
(define (rm/remove-item listof-items item-number)
|
||||
(let* ([item-to-remove (list-ref listof-items item-number)]
|
||||
(define (rm/remove-item listof-items item-number-sub1)
|
||||
(let* ([item-to-remove (list-ref listof-items item-number-sub1)]
|
||||
[list-without-item (remove item-to-remove listof-items)])
|
||||
(display-lines-to-file list-without-item
|
||||
program-path
|
||||
|
@ -283,18 +283,18 @@
|
|||
;; Proper usage
|
||||
[(or '#("-h")
|
||||
'#("--help")
|
||||
'#(help-command)) (help)]
|
||||
[(vector add-command _) (add (args-ref 1))]
|
||||
[(vector rm-command _) (rm (args-ref 1))]
|
||||
[(vector ls-command) (ls)]
|
||||
'#("help")) (help)]
|
||||
[(vector "add" _) (add (args-ref 1))]
|
||||
[(vector "rm" _) (rm (args-ref 1))]
|
||||
[(vector "ls") (ls)]
|
||||
[(vector) (random-message)]
|
||||
;; Improper usage
|
||||
;; This is checked so we can give the user hints on how to
|
||||
;; use the software if they have part of the command
|
||||
;; correct
|
||||
[(vector ls-command _) (displayln-message-list 'error-ls)]
|
||||
[(vector add-command) (displayln-message-list 'error-add)]
|
||||
[(vector rm-command) (displayln-message-list 'error-rm)]
|
||||
[(vector "ls" _) (displayln-message-list 'error-ls)]
|
||||
[(vector "add") (displayln-message-list 'error-add)]
|
||||
[(vector "rm") (displayln-message-list 'error-rm)]
|
||||
[(vector _ ...) (displayln-message-list 'error-usage)]))
|
||||
|
||||
(define (main vectorof-args)
|
||||
|
|
Loading…
Reference in New Issue