Interacting with the Shell
Certain characters are interpreted by the shell. For example, the "&". If you wish to include the & in a task description, you need to escape it, so the shell doesn't interpret it. For example:
% task add Buy bread & milk
This command is an error because of the &. The shell will consider this to be two commands:
% task add Buy bread &
% milk
The shell treats the & character as an indicator that the command is complete and should be run in the background. Then the shell considers "milk" to be a command all by itself. Which it is not. One way to get around this is to individually escape the & character:
% task add Buy bread \& milk
Another is to quote the entire description, with either ' or " characters:
% task add "Buy bread & milk"
Note that if an & character (or any other character that needs to be escaped for the shell) appears in the filter of a custom report then it does not need to be escaped, as it never gets processed by the shell. In other words, shell escapes need only be used when typing task commands at a prompt.
Copyright 2006-2009, P. Beckingham. All rights reserved.