Added sync command.

This commit is contained in:
Thelie 2022-02-14 22:24:41 +01:00
parent 3a9ddbd11d
commit d537bf983b

View file

@ -121,7 +121,8 @@
(define-key taskwarrior-mode-map (kbd "f") 'taskwarrior-set-filter) (define-key taskwarrior-mode-map (kbd "f") 'taskwarrior-set-filter)
(define-key taskwarrior-mode-map (kbd "t") 'taskwarrior-edit-tags) (define-key taskwarrior-mode-map (kbd "t") 'taskwarrior-edit-tags)
(define-key taskwarrior-mode-map (kbd "RET") 'taskwarrior-info) (define-key taskwarrior-mode-map (kbd "RET") 'taskwarrior-info)
(define-key taskwarrior-mode-map (kbd "P") 'taskwarrior-edit-project)) (define-key taskwarrior-mode-map (kbd "P") 'taskwarrior-edit-project)
(define-key taskwarrior-mode-map (kbd "s") 'taskwarrior-sync))
(defun taskwarrior-load-profile (profile) (defun taskwarrior-load-profile (profile)
"Load a predefined taskwarrior PROFILE." "Load a predefined taskwarrior PROFILE."
@ -282,6 +283,11 @@
(taskwarrior-export "status=pending"))) (taskwarrior-export "status=pending")))
(tabulated-list-print t))) (tabulated-list-print t)))
(defun taskwarrior-sync ()
"Sync with taskd server."
(interactive)
(taskwarrior--shell-command "sync"))
(defun taskwarrior-export-task (id) (defun taskwarrior-export-task (id)
"Export task with ID." "Export task with ID."
(let ((task (taskwarrior-vector-to-list (let ((task (taskwarrior-vector-to-list