[ "$dotfiles" = "no" ] && ignore_hidden="-name '.*' -o"
[ "$recurse"  = "no" ] && dont_recurse="-maxdepth 1"
if [ $# -gt 0 ]; then
  path_format="%p"
else
  path_format="%P"
  set -- "./"
fi
ignore_metadata="\( -type d -a \( -name '.git' -o -name '.svn' -o -name 'CVS' \) \) -prune -o"
print_format="\( -type f -printf '%T@\t$path_format\n' \)"
eval find '"$@"' $dont_recurse $ignore_metadata $ignore_hidden $print_format

find -L -- "${XDG_CONFIG_HOME:-${HOME%/}/.config}"'/zsh' \
  '(' \
  -path "${XDG_CONFIG_HOME:-${HOME%/}/.config}"'/zsh/functions' -o \
  -path "${XDG_CONFIG_HOME:-${HOME%/}/.config}"'/zsh/completions' -o \
  -path "${XDG_CONFIG_HOME:-${HOME%/}/.config}"'/zsh/.zfunc' \
  ')' \
  -type f \
  -exec ls -1 -S -- {} + 2>/dev/null |
  command -p -- sed -e '1 q'

find_last() {
  find . -type f -mmin -60
}

find_name() {
  find . -type f -iname '*'"$*"'*'
}

# find by exact name.
find_exact() {
  find "${2:=.}" -name "$1"
}

# find by extension.
find_extension() {
  find "${2:=.}" -type f -name "*.${1:=*}"
}

find_exec() {
  find . -type f -iname '*'"${1:-}"'*' \
    -exec "${2:-file}" {} \;
}

