4 ms·
I don't think I've ever encountered a widely used program that doesn't have that information in its manpage. The manpage is the canonical source the article cal
by p-e-w 3y ago
I don't think I've ever encountered a widely used program that doesn't have that information in its manpage. The manpage is the canonical source the article calls for.
With the exception of New Age software like Go, that for some reason doesn't use manpages, I'm not convinced that the problem implied here actually exists.
- vaughands 3y agoIt's more common to have to guess in blackbox / proprietary software, like games.
- BaculumMeumEst 3y agoDoesn't the man page often list several potential locations where it looks for the file and the ordering behavior, leaving you to investigate and find which is actually loaded? It's still annoying.
- p-e-w 3y agoBut that is exactly the information you need in order to determine which config file is being read in all situations. A single location doesn't cut it if the reality is more complicated. If the goal is to find out which particular file is being used at this particular time, on this particular system, the maximum verbosity log might have that information, and otherwise strace can help, as described in the other comments.
- eptcyka 3y agoI really do not care about all the possible paths a config file might be read from. I want a flag that I can pass to a binary to see which paths it will actually read, and ideally, I'd like those paths to be logged to STDOUT on startup.
- em-bee 3y agobut it reads all of them in a particular order and in case of conflicting settings you have to figure out which one takes precedence.
- eptcyka 3y agoYes, I want to know which files in which order.cI don't want a static list of all possible locations, I want it to deduce what files would take effect in a given environment and with the given config files - a program must already know this when it is ran - so let's just be open and print said paths.
- Joker_vD 3y agoAbsolutely. For example, if you pass "-v" to ssh, it prints paths to configs that it tried to open, paths to identity files that it tried to open, to known_hosts files, etc. This info is not needed so very often, but when it is, it's incredibly useful.
- _dain_ 3y agoYes. Exactly. Which is why the program should tell you which one takes precedence. The program already knows what config files it's loading and in what order, so why is it left up to the human to do all that work again? There should be a flag like --manifest or something that would spit out what actually got loaded from where.
- coldtea 3y agoThat would be stderr but hell yes
- coldtea 3y agoThese Stockhom Syndrome rationalizations are the reason we can't have nice things
- lelanthran 3y agoOkay, but why should I have to determine what the program already knew?
- formerly_proven 3y ago> With the exception of New Age software like Go, that for some reason doesn't use manpages Primarily because man pages need to go in the MANPATH to be useful but these tools tend to dwell somewhere in ~/.
- em-bee 3y agomy manpath includes $HOME/.local/share/man; and that is with $MANPATH unset, so it's a distribution default
- unnah 3y agoOut of interest, I checked out man man on Linux and found the search logic documented in man 5 manpath. In addition to system directories specified in /etc/manpath.config, the man command checks directories in the user's PATH and maps them to related man directories: pathdir, pathdir/../man, pathdir/man, pathdir/../share/man, and pathdir/share/man are all considered. The MANPATH environment variable overrides all other configuration and should not be necessary. So, following current practices, installing binaries in ~/.local/bin and man pages in ~/.local/share/man should work without any additional configuration.
- DangitBobby 3y agoA short way in to TFA: > Ideally I'd like to avoid scanning all the way through the manual page or other documentation for the program to find out, because that's slow and annoying.