Hacker News new | past | comments | ask | show | jobs | submit login

Semantic markup has a use, at least on OpenBSD. You can use the semantic markup for searching manual pages, like this[1]:

> Search for manuals in the library section mentioning both the “optind” and the “optarg” variables:

> $ apropos -s 3 Va=optind -a Va=optarg

[1] https://man.openbsd.org/whatis.1




I wish I could use semantic markup to jump to a definition, either of an option or a subcommand.


You can actually. If you use mandoc instead of mandb, it automatically generates and passes tag files to less. Then you can just type ":t e" to jump to the docs for the -e option, for example.


Interesting, so theoretically that is something that every distro could and should be doing?


When does someone need to search for that sort of thing?


A more realistic example might be that you're changing $LANG and now something broke. You can thus search for everything that uses LANG[1] and see what's most likely to have broken in what way.

[1] https://man.openbsd.org/?query=Ev%3DLANG&apropos=1&sec=0&arc...


There are some many things that are affected by locale environment variables (most of the time without documenting it explicitly), that this particular query is mostly useless.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: