diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-03-27 13:44:43 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-03-27 13:44:43 -0400 |
commit | c5ad36dd179c63517738cecaaf8474d8fd665a98 (patch) | |
tree | 82e675e76cf0140fef5c5712f773e2664304dc38 | |
parent | cae04995dbb55b24e746c36a8ad326a3438d4103 (diff) | |
download | bfs-c5ad36dd179c63517738cecaaf8474d8fd665a98.tar.xz |
README: Add a blurb about fancy errors/warnings
-rw-r--r-- | README.md | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -89,6 +89,28 @@ $ <strong>bfs</strong> -L <em>haystack</em> -name 'needle' │ $ <strong>find </details> <details> +<summary><code>bfs</code> gives helpful errors and warnings.</summary> + +For example, `bfs` will detect and suggest corrections for typos: + +<pre> +$ bfs -nam needle +<strong>bfs: error:</strong> bfs <strong>-nam</strong> needle +<strong>bfs: error:</strong> <strong>~~~~</strong> +<strong>bfs: error:</strong> Unknown argument; did you mean <strong>-name</strong>? +</pre> + +`bfs` also includes a powerful static analysis to identify likely mistakes: + +<pre> +$ bfs -print -name 'needle' +<strong>bfs: warning:</strong> bfs -print <strong>-name needle</strong> +<strong>bfs: warning:</strong> <strong>~~~~~~~~~~~~</strong> +<strong>bfs: warning:</strong> The result of this expression is ignored. +</pre> +</details> + +<details> <summary><code>bfs</code> adds some options that make common tasks easier.</summary> ### `-exclude` |