简体   繁体   English

没有确认对话框的任务战士“任务删除”

[英]taskwarrior "task del" without confirmation dialog

In taskwarrior there are some commands which need confirmirmation, like deleting more than 2 tasks or modify recurring tasks.在 taskwarrior 中有一些命令需要确认,比如删除超过 2 个任务或修改重复任务。 I don't want to confirm every time and I have already set "confirmation off" in file.taskrc.我不想每次都确认,我已经在 file.taskrc 中设置了“确认关闭”。

I'm using the subprocess module in python to invoke taskwarrior commands.我正在使用 python 中的子进程模块来调用 taskwarrior 命令。 I'm calling for example task del 1,2,3 and the shell waits now for a manual confirmation of the deletion request.例如,我正在调用task del 1,2,3 ,而 shell 现在正在等待手动确认删除请求。

How can I avoid the manual confirmation?如何避免手动确认?

You should add confirmation=no to ~/.taskrc . 你应该在~/.taskrc添加confirmation=no

Here's a one-liner to do that: 这是一个单行代码:

echo confirmation=no >> ~/.taskrc

already added confirmation=no to ~/.taskrc 已添加confirmation=no ~/.taskrc

a possible answer to the question could be 问题的可能答案可能是

echo 'all' | task del 1,2,3

but there could be a better one 但可能会有一个更好的

To disable confirmations entirely, I have the following in my taskrc :要完全禁用确认,我的taskrc中有以下内容:

# no confirmation on bulk actions
confirmation=off
bulk=0

This command will remove tasks 1 , 2 and 3 without asking for confirmation:此命令将删除任务123而不要求确认:

$ task rc.bulk=0 rc.confirmation=off 1-3 delete

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Flask为POST请求添加确认对话框? - How to add confirmation dialog for POST request with Flask? 对话框确认后的Tkinter askopendialog运行时错误 - Tkinter askopendialog runtime error after dialog confirmation Django DeleteView 无确认模板 - Django DeleteView without confirmation template python del函数如何在不调用__getitem__的情况下工作 - How does the python del function work without calling __getitem__ 直接向用户订阅邮件列表,无需确认 - Subscribing users directly to a mailing list without confirmation 没有对话框的自动完成 - autocompletion without dialog gtk在执行任务时加载对话框 - gtk loading dialog while performing task 如何在不渲染 html 页面的情况下删除 django 中的 object 以获得确认 - How to delete an object in django without rendering an html page to get the confirmation 我正在尝试使用python通过请求将数据提交到网站。 如何通过确认对话框? - Using python i am trying to submit data to a website via requests. How to pass the confirmation dialog? 删除 Odoo One2many 树列表中的记录时如何显示确认对话框? - How to show confirmation dialog when deleting records in Odoo One2many tree list?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM