Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
+1 vote
in vifm by

Is it possible to permanently exclude certain folders from 'find' command?

For example, if I never want to 'find' inside .git directories, can I put something into the vifmrc to ignore them (even if current filter shows dotfiles)?

1 Answer

0 votes
Best answer

You can adjust 'findprg' option like this:

set findprg='find %s %a -print , -type d \( ! -readable -o ! -executable -o -path "*/.git" \) -prune'

Compared to default value only -o -path "*/.git" is added, which makes find do -prune for paths that match that pattern (the subtree is skipped entirely without descending into it).

See man find for details about the syntax.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.

Support Ukraine