path: root/
diff options
authorTavian Barnes <>2022-05-07 12:47:12 -0400
committerTavian Barnes <>2022-05-09 11:55:06 -0400
commit37a9a5cda31f3b97dc8a14da37e5a1dd6fa99e9c (patch)
treed21d04b75a56c255e0f7fe845fee28b954f0203d /
parente889335e0a5f5dfb2e15219d841ad8725e4a719b (diff)
docs: New document
Diffstat (limited to '')
1 files changed, 14 insertions, 40 deletions
diff --git a/ b/
index 07c5c3b..4f49dac 100644
--- a/
+++ b/
@@ -12,9 +12,10 @@
[ **[Features](#features)** ]&emsp;
[ **[Installation](#installation)** ]&emsp;
-[ **[Changelog](/docs/** ]&emsp;
+[ **[Usage](/docs/** ]&emsp;
[ **[Building](/docs/** ]&emsp;
-[ **[Hacking](/docs/** ]
+[ **[Hacking](/docs/** ]&emsp;
+[ **[Changelog](/docs/** ]
<img src="" alt="Screenshot">
@@ -126,7 +127,7 @@ $ bfs -nam needle
<strong>bfs: error:</strong> Unknown argument; did you mean <strong>-name</strong>?
-`bfs` also includes a powerful static analysis to identify likely mistakes:
+`bfs` also includes a powerful static analysis to help catch mistakes:
$ bfs -print -name 'needle'
@@ -142,48 +143,21 @@ $ bfs -print -name 'needle'
-### `-exclude`
+For example, the `-exclude` operator skips over entire subtrees whenever an expression matches.
+`-exclude` is both more powerful and easier to use than the standard `-prune` action; compare
-The `-exclude` operator skips an entire subtree whenever an expression matches.
-For example, `-exclude -name .git` will exclude any files or directories named `.git` from the search results.
-`-exclude` is easier to use than the standard `-prune` action; compare
- bfs -name config -exclude -name .git
+$ bfs -name config <strong>-exclude -name .git</strong>
to the equivalent
- find ! \( -name .git -prune \) -name config
-Unlike `-prune`, `-exclude` even works in combination with `-depth`/`-delete`.
-### `-hidden`/`-nohidden`
-`-hidden` matches "hidden" files (dotfiles).
-`bfs -hidden` is effectively shorthand for
- find \( -name '.*' -not -name . -not -name .. \)
-`-nohidden` is equivalent to `-exclude -hidden`.
-### `-unique`
-This option ensures that `bfs` only visits each file once, even if it's reachable through multiple hard or symbolic links.
-It's particularly useful when following symbolic links (`-L`).
-### `-color`/`-nocolor`
-When printing to a terminal, `bfs` automatically colors paths like GNU `ls`, according to the `LS_COLORS` environment variable.
-The `-color` and `-nocolor` options override the automatic behavior, which may be handy when you want to preserve colors through a pipe:
- bfs -color | less -R
+$ find <strong>! \( -name .git -prune \)</strong> -name config
-If the [`NO_COLOR`]( environment variable is set, colors will be disabled by default.
+As an additional shorthand, `-nohidden` skips over all hidden files and directories.
+See the [usage documentation](/docs/ for more about the extensions provided by `bfs`.