diff --git a/client.rkt b/client.rkt index f236e94..1e0c3a9 100644 --- a/client.rkt +++ b/client.rkt @@ -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 ()