]> git.jsancho.org Git - guile-click.git/blobdiff - examples/nested.scm
Nested commands help message
[guile-click.git] / examples / nested.scm
index 023e1ef72f479f140b9ae8f6073551b8cda6e046..414e5896b931f0dd9db958f0c30e21b46b7263ca 100755 (executable)
 
 (define initdb
   (command
-   '()
-   (lambda ()
-     (format #t "Initialized the database"))))
+   #:name "initdb"
+   #:help "Init database."
+   #:procedure (lambda ()
+                 (format #t "Initialized the database"))))
 
 (define dropdb
   (command
-   '()
-   (lambda ()
-     (format #t "Dropped the database"))))
+   #:name "dropdb"
+   #:help "Drop database."
+   #:procedure (lambda ()
+                 (format #t "Dropped the database"))))
 
 (define cli
   (group
-   '()
-   "Database Tools"
-   initdb
-   dropdb))
+   #:help "Database Tools"
+   #:commands `(,initdb ,dropdb)))
 
 (cli (command-line))