[][src]Module task_hookrs::tw

This module offers functions to interact with taskwarrior. This will expect the task binary in your path. This will always call task and never interact with your .task directory itself. (This is in accordance with the taskwarrior api guide lines.)

Functions

add_query_to_cmd

This will take a Command, and append the given query string splited at whitespace followed by the "export" command to the arguments of the Command.

query

This will give you all tasks which match the given query in the taskwarrior query syntax. This is not sanitized. Never get the query string from an untrusted user.

run_query_cmd

This executes the given Command and trys to convert the Result into a Vec.

save

This will save the given tasks to taskwarrior. Call with Some(&task) if you just have one task. This will block until the save was successful.

save_async

This function returns the handle to a child process which saves the given tasks.

save_to_cmd

This function runs the given Command, pipes the tasks as JSON to it and returns a handle to the child process.