Add 'lasttask' service command

This commit is contained in:
Nikolay Puzanov 2015-09-21 12:17:37 +03:00
parent a3a2c521c6
commit d0bd48b0a1

View File

@ -634,6 +634,13 @@
(format #t "~{~a ~}\n" (record-name-list deadlines)) (format #t "~{~a ~}\n" (record-name-list deadlines))
(values #f #f)) (values #f #f))
;;; Print last task
(define (cmd-lasttask sheet deadlines . unused)
(let ((last (last-task sheet)))
(when (not (null? last))
(format #t "~a\n" (path->string (car last)))))
(values #f #f))
;;; Deadlines ;;; Deadlines
(define (cmd-deadline sheet deadlines . args) (define (cmd-deadline sheet deadlines . args)
(let ((deadlines (let ((deadlines
@ -770,6 +777,7 @@
;; Service commands ;; Service commands
((string= command "tasklist") cmd-tasklist) ((string= command "tasklist") cmd-tasklist)
((string= command "deadlist") cmd-deadlist) ((string= command "deadlist") cmd-deadlist)
((string= command "lasttask") cmd-lasttask)
;; ----------------------- Show usage ------------------------- ;; ;; ----------------------- Show usage ------------------------- ;;
(else (else