#compdef ff autoload -U is-at-least _ff() { typeset -A opt_args typeset -a _arguments_options local ret=1 if is-at-least 5.2; then _arguments_options=(-s -S -C) else _arguments_options=(-s -C) fi local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ '*-D+[Add a starting point.]' \ '*--include=[Add a starting point.]' \ '*-E+[Remove a branch in directory trees.]' \ '*--exclude=[Remove a branch in directory trees.]' \ '-t+[Filter by type: d,directory, f,file, l,symlink, x,executable]' \ '--type=[Filter by type: d,directory, f,file, l,symlink, x,executable]' \ '-d+[Set maximum search depth. \[default: unlimited\]]' \ '--max-depth=[Set maximum search depth. \[default: unlimited\]]' \ '-c+[When to use colors: auto, never, always \[default: auto\]]: :(auto never always)' \ '--color=[When to use colors: auto, never, always \[default: auto\]]: :(auto never always)' \ '-j+[Set number of threads for searching and command execution.]' \ '--threads=[Set number of threads for searching and command execution.]' \ '--max-buffer-time=[Set time (in milliseconds) for buffering and sorting.]' \ '-x+[Execute the given command for each search result.]' \ '--exec=[Execute the given command for each search result.]' \ '-g[Search with a glob pattern. \[default\]]' \ '--glob[Search with a glob pattern. \[default\]]' \ '-r[Search with a regex pattern.]' \ '--regex[Search with a regex pattern.]' \ '-u[Match UTF-8 scalar values instead of bytes.]' \ '--unicode[Match UTF-8 scalar values instead of bytes.]' \ '-i[Case-insensitive search.]' \ '--ignore-case[Case-insensitive search.]' \ '-s[Case-sensitive search. \[default\]]' \ '--case-sensitive[Case-sensitive search. \[default\]]' \ '-p[Match the full path of a file.]' \ '--full-path[Match the full path of a file.]' \ '-L[Follow symbolic links.]' \ '--follow[Follow symbolic links.]' \ '-M[Do not descend into directories on another file system.]' \ '--mount[Do not descend into directories on another file system.]' \ '-0[Terminate each search result with a NUL character.]' \ '--print0[Terminate each search result with a NUL character.]' \ '-A[Output absolute paths instead of relative paths.]' \ '--absolute-path[Output absolute paths instead of relative paths.]' \ '-S[Sort the results by pathname.]' \ '--sort-path[Sort the results by pathname.]' \ '-a[Include dot-files in the search.]' \ '--all[Include dot-files in the search.]' \ '-I[Do not respect .(git)ignore files.]' \ '--no-ignore[Do not respect .(git)ignore files.]' \ '-m[All executed commands receive the same input.]' \ '--multiplex[All executed commands receive the same input.]' \ '-v[Warn about I/O errors, permission, symlink loops, etc.]' \ '--verbose[Warn about I/O errors, permission, symlink loops, etc.]' \ '-h[Print help information. Use --help to show details and full list of options.]' \ '--help[Print help information. Use --help to show details and full list of options.]' \ '-V[Print version information.]' \ '--version[Print version information.]' \ '::DIRECTORY -- The root directory for the search. \[optional\] If omitted, search the current working directory.:_files' \ '::PATTERN -- A regex or glob pattern for matching files. \[optional\] The default patterns for regex and glob are ^ and * respectively. It can also be a chain of filters. Use --help for details.:_files' \ && ret=0 } (( $+functions[_ff_commands] )) || _ff_commands() { local commands; commands=( ) _describe -t commands 'ff commands' commands "$@" } _ff "$@"