diff --git a/babashka.el b/babashka.el index eb2bf66..1bb7081 100644 --- a/babashka.el +++ b/babashka.el @@ -106,9 +106,12 @@ "Convert TASKS to annotated alist." (let (results) (maphash (lambda (key value) - (let ((task-name (symbol-name key))) + (let ((task-name (symbol-name key)) + (doc (if (hash-table-p value) + (gethash :doc value) + ""))) (unless (string-prefix-p ":" task-name) - (push (cons task-name (gethash :doc value)) + (push (cons task-name doc) results)))) tasks) results)) diff --git a/bb.edn b/bb.edn index 8b67f93..86692b0 100644 --- a/bb.edn +++ b/bb.edn @@ -5,7 +5,7 @@ :task (if *command-line-args* (apply println "Hello," *command-line-args*) (println "Hello, world!"))} - + ls (shell "ls") bye {:doc "Goodbye world!" :task (println "Goodbye, world!")}}}