implement an "up" command

This commit is contained in:
2025-09-06 11:39:14 -07:00
parent fcb7346209
commit e081ec9edf

View File

@@ -29,6 +29,21 @@
(super-new)
(define/public (up-cmd)
(if (string=? (path->string
(simplify-path
(url->path current-url)))
"/")
(displayln "already at root!")
(let ([parent
(simplify-path
(build-path (url->path current-url) 'up)
#f)])
(get (struct-copy url current-url
[path (url-path (path->url parent))])))))
(define/public (go-cmd url-string)
(if (non-empty-string? url-string)
(let ()