Replace read-from-minibuffer with yes-or-no-p
No reason to reinvent the wheel.
This commit is contained in:
parent
e92708ae9a
commit
3de77fb049
1 changed files with 4 additions and 4 deletions
|
@ -165,8 +165,8 @@
|
||||||
"Mark current task as done."
|
"Mark current task as done."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((id (taskwarrior-id-at-point))
|
(let ((id (taskwarrior-id-at-point))
|
||||||
(confirmation (read-from-minibuffer "Done [y/n]?: ")))
|
(confirmation (yes-or-no-p "Done?")))
|
||||||
(when (string= confirmation "y")
|
(when confirmation
|
||||||
(taskwarrior--shell-command "done" id)
|
(taskwarrior--shell-command "done" id)
|
||||||
(taskwarrior-update-buffer))))
|
(taskwarrior-update-buffer))))
|
||||||
|
|
||||||
|
@ -174,8 +174,8 @@
|
||||||
"Delete current task."
|
"Delete current task."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((id (taskwarrior-id-at-point))
|
(let ((id (taskwarrior-id-at-point))
|
||||||
(confirmation (read-from-minibuffer "Delete [y/n]?: ")))
|
(confirmation (yes-or-no-p "Delete?")))
|
||||||
(when (string= confirmation "y")
|
(when confirmation
|
||||||
(taskwarrior--shell-command "delete" id "" "" "yes")
|
(taskwarrior--shell-command "delete" id "" "" "yes")
|
||||||
(taskwarrior-update-buffer))))
|
(taskwarrior-update-buffer))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue