diff --git a/README.md b/README.md index 37b0f0d..a9dd2ed 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ src/ ## Usage ### Basic Search + ```bash manwhere sleep # Find all man pages mentioning "sleep" # Output: @@ -40,11 +41,13 @@ manwhere sleep # Find all man pages mentioning "sleep" ``` ### Interactive Selection with fzf + ```bash manwhere sleep | fzf | xargs man # Select and open a man page ``` ### Section Filtering + ```bash manwhere -s 1 sleep # Find only commands (section 1) manwhere --section 3 sleep # Find only library functions (section 3) @@ -52,28 +55,19 @@ manwhere -s 1 -s 3 sleep # Search sections 1 and 3 ``` ### Help + ```bash manwhere -h # Show help message ``` -## Man Page Sections - -- **1**: Commands (user commands) -- **2**: System calls -- **3**: Library functions -- **4**: Device files -- **5**: File formats -- **6**: Games -- **7**: Miscellaneous -- **8**: System administration -- **9**: Kernel routines - ## Building ### Prerequisites + - Zig 0.15.1 or later ### Build Commands + ```bash # Debug build (for development) zig build @@ -82,34 +76,22 @@ zig build zig build release ``` -## Performance - -- **Typical search time**: ~10ms -- **Memory usage**: Minimal (streams results) -- **No database required**: Scans filesystem directly - -## Design Philosophy - -This tool follows Unix philosophy: do one thing well and compose with other tools. - -- **No interactive mode**: Use `fzf`, `dmenu`, or similar tools -- **No descriptions**: Fast name-only output -- **No verbose mode**: Silent operation for scripts -- **No formatted output**: Plain text for easy parsing - ## Example Workflows ### Find and open a man page + ```bash manwhere printf | fzf | xargs man ``` ### Quick lookup with preview + ```bash manwhere sleep | fzf --preview 'man {}' ``` ### Scripting + ```bash # Find all SSL-related functions manwhere ssl | while read name; do @@ -120,6 +102,7 @@ done ## POSIX Compatibility Works reliably on: + - **Linux**: Standard `/usr/share/man` and `/usr/local/share/man` - **macOS**: Standard paths plus Homebrew (`/opt/homebrew/share/man`) and MacPorts (`/opt/local/share/man`) - **Other Unix-like systems**: Standard man page directory structures