github.com/taylormonacelli/toodo


Install
go get github.com/taylormonacelli/toodo

Documentation

toodo

summary

Wrapper around mdfind on macos.

This

toodo --root=~/pdev --file-extension=go --file-extension=txt 1w
# or
toodo -r ~/pdev -e go -e txt 1h

runs this:

mdfind "kMDItemFSContentChangeDate >= $time.now(-604800) && (kMDItemFSName == '*.go' || kMDItemFSName == '*.txt')" -onlyin ~/pdev

install

make install

usage

Example:

# Most often I want to find go files modified within the last week.
toodo 1w -e=go

# show help
toodo -h

# find *.go or *.txt files modified within the last 0.001 days
toodo -v -v 0.001d -e=go -e txt

# find files modified within the last 10 minutes
toodo 10m

# find files modified within the last 1 month
toodo 1M

# find *.go modified within the last hour and limit search to ~/pdev dir and all descendants
toodo -vv 1h -e=go --root=~/pdev

help

Usage:
  toodo [OPTIONS] Period

Application Options:
      --log-format=[text|json] Log format (default: text)
  -v, --verbose                Show verbose debug information, each -v bumps log level
  -e, --file-extension=        File extension to search for
  -r, --root=                  Root directory for search

Help Options:
  -h, --help                   Show this help message

Arguments:
  Period:                      Time period parameter in the format 1y, 1M10w1m, 10M, 10m, 200s, 34d,
                               1y23d, 2d20s, etc.