#compdef antifind
# zsh completion for antifind: antifind --completions zsh > ~/.zfunc/_antifind
_arguments -s \
  '*'{-e,--ext}'[extension]:extension:' \
  '*'{-t,--type}'[type]:type:((f\:file d\:folder l\:link))' \
  '*'{-S,--size}'[size: +1G at least, -10k at most]:size:' \
  '*--changed[changed in the last AGE or since a date]:age:' \
  '*--changed-before[changed longer ago than AGE]:age:' \
  '(-d --max-depth)'{-d,--max-depth}'[levels below the folders]:levels:' \
  '(-i --ignore-case --case-sensitive)'{-i,--ignore-case}'[ignore case]' \
  '(-i --ignore-case --case-sensitive)--case-sensitive[match case]' \
  '(--accents --no-accents)--accents[match accents exactly]'   '(--accents --no-accents)--no-accents[ignore accents]'   '(-x --skipmount)'{-x,--skipmount}'[stay off other mounts below the folders]' \
  '(-a --all)'{-a,--all}'[every indexed filesystem]' \
  '(-n --max)'{-n,--max}'[at most N results]:count:' \
  '--sort[sort key]:key:(name path size date ext none)' \
  '(-r --reverse)'{-r,--reverse}'[reverse the order]' \
  '(-l --long)'{-l,--long}'[long listing]' \
  '(-c --count)'{-c,--count}'[only count]' \
  '--format[output template]:format:' \
  '--json[JSON lines]' \
  '--jsonl[one JSON object per result, streamed, with a versioned schema]' \
  '--limit[at most N results]:count:' \
  '(-0 --null)'{-0,--null}'[NUL separated]' \
  '--raw[do not escape paths]' \
  '--color[colour]:when:(auto always never)' \
  '(-w --watch)'{-w,--watch}'[follow changes]' \
  '--since[replay changes of the last TIME]:time:' \
  '--alias[save a query]:name=query:' \
  '--aliases[list saved queries]' \
  '--saved[list built-in and saved searches]' \
  '--save[save a search]:name:' \
  '--forget[remove a saved search]:name:' \
  '--copy[copy a saved search]:name:' \
  '--param[a parameter of a saved search]:name=kind\:default:' \
  '--describe[describe a saved search]:text:' \
  '--live[the newest changes, refreshed in place]' \
  '--mark[note the time]:name:' \
  '--marks[list marks]' \
  '--since-mark[changes since a mark]:name:' \
  '--completions[print a completion script]:shell:(bash zsh fish)' \
  '--status[service state]' \
  '--reindex[build a fresh index now (root)]' \
  '--remember[remember a slow drive: its names are read gently in the background]:folder:_files -/' \
  '--refresh-slow[read the remembered slow drives now]' \
  '--socket[socket path]:path:_files' \
  '--gui[start the desktop app]' \
  '--print-query[show the query words and stop]' \
  '(-h --help)'{-h,--help}'[help]' \
  '--version[version]' \
  '1:pattern:' \
  '*:folder:_directories'
