3 ms·
My #1 problem with man pages is when I want to search for a command flag in a long man page. If I search for "-f" then I get results for eg, --enable-feces, ma
by wheybags 6y ago
My #1 problem with man pages is when I want to search for a command flag in a long man page.
If I search for "-f" then I get results for eg, --enable-feces, maybe a bunch of other flags with embedded fs, and a bunch of embedded example commands using those flags before actually getting to the section for -f. I wish there was a special query type that said "this is a flag I'm searching for".
- jez 6y agoI usually get around this by searching for -f<Space> or -f, (sometimes the comma separates a short and long option).
- theIV 6y agoI agree, this is very frustrating. My “workaround” is to search for ` -f`, that is, two spaces in front of the flag. Doesn’t always work but _usually_ gets me closer. Hope this helps disabling the feces.
- Kopiks 6y agoFrankly, I feel like man pages are largely useless and I've given up on them entirely. Instead, I use something like tldr to tell me what I need to do for common use cases, because when I'm trying to solve a certain task, I don't want to learn about 100 different flags for every single shell tool involved. If tldr fails, it's Stack Overflow.
- Topgamer7 6y agoI certainly look to tldr first. But man pages can still be quite useful
- bspammer 6y agoA solution for this is actually shown in one of the asciicinema examples in the article: prepending \s+ will find only examples with whitespace in front. https://asciinema.org/a/17Kcnb8PBNIz8JdogOFKVeDQn https://asciinema.org/a/17Kcnb8PBNIz8JdogOFKVeDQn