no arguments => start page

svn: r10441

original commit: a1a53524c08f53efd64a19f25e8525a328a21d66
This commit is contained in:
Eli Barzilay 2008-06-24 17:35:10 +00:00
parent 1863485d73
commit 80f1f87627

View File

@ -1,13 +1,15 @@
#lang scheme/base #lang scheme/base
(require "search.ss" scheme/cmdline scheme/list) (require "search.ss" scheme/cmdline scheme/list scheme/string)
;; Minimal command-line arguments, the query string can contain all ;; Minimal command-line arguments, the query string can contain all
;; kinds of magic. ;; kinds of magic.
(command-line (command-line
#:handlers #:handlers
(lambda (_ . ts) (lambda (_ . ts)
(perform-search (apply string-append (add-between ts " ")))) (if (null? ts)
(send-main-page)
(perform-search (string-append* (add-between ts " ")))))
'("search-terms") '("search-terms")
(lambda (help-str) (lambda (help-str)
(display help-str) (display help-str)