π§ Advanced Usage
Qob
is just a regular Common Lisp file and should be read from Lisp
implementation itself! You can do:
; Regular Qob file content...
(setq qob-enable-color t) ; Display color
qob
provides some hooks which enable you to execute code before and after
each command. The hooks look like so:
qpb-before-COMMAND-hook
qob-after-COMMAND-hook
For example, execute certain tasks after the command qob build
:
(qob-add-hook 'qob-after-build-hook
(lambda ()
;; Do tasks after build
))
Or hooks that run on every command:
qob-before-command-hook
qob-after-command-hook
(qob-add-hook 'qob-before-command-hook
(lambda ()
(format T "~A" (qob-command)))) ; print the current command
For subcommands that contain spaces, will concatenate with /
:
$ qob clean workspace # clean/workspace
$ qob create cl-project # create/cl-project
therefore,
(qob-add-hook 'qob-before-clean/workspace-hook
(lambda ()
;; do stuff before clean workspace...
))