![Forrest logo](/images/logo.png)
todoist:tldr:2fe8d
The command "todoist list --filter '(@${label_name} | ${today}) & p${1}'" is used to list tasks from the Todoist application based on specific filters.
Let me break it down for you:
- "todoist list" is the main command that instructs the Todoist application to list tasks.
- "--filter" is an option that allows you to specify filters for the listed tasks.
- "'(@${label_name} | ${today}) & p${1}'" is the filter expression used in this command. It consists of three parts:
-
"@${label_name}": This part represents a label filter in Todoist. It retrieves tasks that have a specific label assigned to them. The "${label_name}" placeholder should be replaced with the actual name of the label you want to filter by.
-
"|": This symbol functions as the logical OR operator. It combines multiple filter conditions and retrieves tasks that meet at least one of the conditions on its left or right side.
-
"${today}": This part represents a date filter that retrieves tasks with a due date of today.
-
"&": This symbol functions as the logical AND operator. It combines multiple filter conditions and retrieves tasks that meet all of the conditions on its left and right side.
-
"p${1}": This part represents a priority filter that retrieves tasks with a specific priority level. The "${1}" placeholder should be replaced with the desired priority level (e.g., 1 for highest priority, 2 for medium priority, etc.).
By using this command with the appropriate label, date, and priority filters, Todoist will list all the tasks that match the specified criteria.