pub fn add_query_to_cmd(query: &str, cmd: Command) -> Command
Expand description

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.

Examples found in repository?
src/tw.rs (line 23)
22
23
24
25
26
pub fn query(query: &str) -> Result<Vec<Task>, Error> {
    let mut cmd = add_query_to_cmd(query, Command::new("task"));
    cmd.stdout(Stdio::piped());
    run_query_cmd(cmd)
}