(declare (unit tick-show)) (module tick-show () (import scheme) (import (chicken base) (chicken file) (chicken pathname) (chicken string)) (import commands) (import tick) (define-command 'show "\ [show] Show ticket identified by (a partial/complete SHA1 hash, a Trac ticket number, or `-' as an alias to the last referenced ticket hash)." (lambda (args) (when (null? args) (show-command-help 'show 1)) (let* ((thash (ensure-ticket (car args))) (ticket (read-ticket thash))) (set-last-used-ticket-hash! thash) (with-output-to-pager (lambda () (render-ticket ticket)))))) ) ;; end module