add abbreviations for existing commands
This commit is contained in:
10
gem300.rkt
10
gem300.rkt
@@ -41,13 +41,15 @@
|
|||||||
|
|
||||||
(let ([matches (regexp-match #px"(\\w+)\\s*(.*)" (read-line))])
|
(let ([matches (regexp-match #px"(\\w+)\\s*(.*)" (read-line))])
|
||||||
(cond
|
(cond
|
||||||
;; nothing was given. default command
|
;; next command. also default
|
||||||
[(not matches)
|
[(or (not matches)
|
||||||
|
(string=? (cadr matches) "next")
|
||||||
|
(string=? (cadr matches) "n"))
|
||||||
(next-cmd)]
|
(next-cmd)]
|
||||||
|
|
||||||
;; go command
|
;; go command
|
||||||
[(string=? (cadr matches) "go")
|
[(or (string=? (cadr matches) "go")
|
||||||
|
(string=? (cadr matches) "g"))
|
||||||
(go-cmd (caddr matches))]))
|
(go-cmd (caddr matches))]))
|
||||||
|
|
||||||
|
|
||||||
(repl))
|
(repl))
|
||||||
|
Reference in New Issue
Block a user