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