(import (chicken platform) (chicken process) uri-common ) (define (open-url url) "Attempts to open a URL `url` with the default web browser by calling a command: Mac: open, Windows: cmd /c start, POSIX: xdg-open" (cond [(eq? (software-version) 'macosx) (system (string-append "open " (qs url)) )] [(eq? (software-type) 'windows) (system (string-append "cmd /c start " (qs url)) )] [else (system (string-append "xdg-open " (qs url)) )] ) ) (define (help query) "Opens chickadee docs for string `query`." (open-url (string-append "https://api.call-cc.org/5/cdoc/?query-regex=Regexp&q=" (uri-encode-string query)) ) )