Skip to content
Brett Terpstra edited this page Mar 20, 2022 · 4 revisions

Among the commands that can show you what you've been doing:

show      - List all entries
recent    - List recent entries
today     - List entries from today
yesterday - List entries from yesterday
last      - Show the last entry
grep      - Show entries matching text or pattern
since     - List entries since a date

Filtering options

Most of the display commands accept various filters for sifting through entries. Use doing help COMMAND to get specifics for each one.

  • --search will match a search string, and --tag will filter based on tags. See Tag And Search Filtering for details.
  • --before and --after take natural language date or time strings. If a day is specified, the filter will be a date filter. If only a time is specified, dates won't be filtered but times will.
  • --from accepts a date or range. Without a range it's the same as --after. With a range, e.g. "mon 8am to fri 5pm", it serves as both --before and --after. If only times are given, it becomes a time filter for all specified dates. The before, after, and from filters can be combined to filter on both dates and times.

Saving Filters and Custom Commandsk

You can automatically save filter options specified on the command line as a new view using the --save NAME flag. See the "Saving Display Options" and "Views as Comands" sections of custom views for more info.

Time tracking

  • --totals: Display total times for all tags displayed at the bottom of the output (change timer format using timer_format config key)
  • --times: On entries with a @done tag with date value, show the time interval between creation and @done value (requires %interval in template)
  • --duration: show current elapsed time on entries that don't have a @done tag (requires %duration in template) (available in 2.1.1)

show

doing show on its own will list all entries in the "Currently" section. Add a section name as an argument to display that section instead. Use "all" to display all entries from all sections.

You can filter the show command by tags. Simply list them after the section name (or all). The boolean defaults to ANY, meaning any entry that contains any of the listed tags will be shown. You can use -b ALL or -b NONE to change the filtering behavior: doing show all done cancelled -b NONE will show all tasks from all sections that do not have either @done or @cancelled tags.

Use -c X to limit the displayed results. Combine it with -a newest or -a oldest to choose which chronological end it trims from. You can also set the sort order of the output with -s asc or -s desc.

The show command can also show the time spent on a task if it has a @done(date) tag with the -t option. This requires that you include a %interval token in template -> default in the config. You can also include @start(date) tags, which override the timestamp when calculating the intervals.

If you have a use for it, you can use -o csv on the show or view commands to output the results as a comma-separated CSV to STDOUT. Redirect to a file to save it: doing show all done -o csv > ~/Desktop/done.csv. You can do the same with -o json.

yesterday

doing yesterday is great for stand-ups (thanks to Sean Collins for that!). Note that you can show yesterday's activity from an alternate section by using the section name as an argument (e.g. doing yesterday archive).

All of the display commands (view, show, today, yesterday, search) support date ranges in addition to other filtering options. Results can be narrowed to a date/time span using --before DATE and --after DATE. The DATE accepts a natural language string but works best in formats like 10/20/21 or 2021-05-13 3pm (or shortened to just 5/13 3pm). For the today and yesterday commands the DATE should just be a time, e.g. 12pm or 15:00, and results will be filtered within the timespan for just that day. Both flags are optional, and you can use just --before to get everything older than a certain date, or use just --after to get everything newer.

on

doing on allows for full date ranges and filtering. doing on saturday, or doing on one month to today will give you ranges. You can use the same terms with the show command by adding the -f or --from flag. doing show @done --from "monday to friday" will give you all of your completed items for the last week (assuming it's the weekend). There's also doing since, a simple alias for doing on PAST_DATE to now, e.g. doing since monday.

search/grep

You can also show entries matching a search string with doing grep (synonym doing search). If you want to search with regular expressions, surround your search query with forward slashes, e.g. doing search /project name/. If you pass a search string without slashes, it's treated as a fuzzy search string, meaning matches can be found as long as the characters in the search string are in order and with no more than three other characters between each. To force an exact match, start the string with a single quote ("'Exact test").

By default searches are across all sections, but you can limit it to one with the -s SECTION_NAME flag. Searches can be displayed with the default template, or output to any export format available.

view

view     - Display a user-created view
views    - List available custom views

Display any of the custom views you make in ~/.doingrc with the view command. Use doing views to get a list of available views. Any time a section or view is specified on the command line, fuzzy matching will be used to find the closest match. Thus, lat will match Later, etc..