New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Un-hide documentation of non-fish shell builtins #10376
Conversation
URLs are not rendered in our man pages. Let's tell Sphinx to include links in the output until sphinx-doc/sphinx#12108 is widely available. In particular, this helps the next commit.
When writing scripts for other shells, it can be confusing and annoying that our `man` function shadows other manual pages, for example `exec(1p)` from [Linux man-pages]. I almost never want to see the fish variant for such contended cases (which obviuosly don't include fish-specific commands like `string`, only widely-known shell builtins). For the contented cases like `exec`, the POSIX documentation is more substantial and useful, since it describes a (sub)set of languages widely used for scripting. Because of this I think we should stop overriding the system's man pages. Nowadays we offer `exec -h` as intuitive way to show the documentation for the fish-specific command (note that `help` is not a good replacement because it uses a web browser). Looking through the contended commands, it seems like for most of them, the fish version is not substantially different from the system version. A notable exception is `read` but I don't think it's a very important one. So I'm saying: we can sacrifice a bit of the native fish-scripting experience in exchange for playing nicer with the outside world. I think the latter is more important because scripting is not our focus, the way I see it. So maybe put our manpath at the end. In lieu of that, we should at least have `exec.rst` reference the system or POSIX variants, which is what this draft patch does, to set the stage. [Linux man-pages]: https://www.kernel.org/doc/man-pages/
The fish-shell/doc_src/cmds/test.rst Lines 17 to 21 in 46cde6c
And I think Other builtins that are different from posix in ways that can catch people off-guard:
These are important differences that make those manpages confusing when you are inside of fish. It's fine to add links to the other man pages, tho I would do it like test does, or at least do it consistently. Personally I also don't think the link to POSIX is useful - it's not very easy to read and describes a weird maybe-subset of what is actually on your system. |
Fundamentally this is a political issue. I don't think you value my use case (wanting to write sh scripts, not fish) as much and at the same time I don't really empathize with people who write fish-specific scripts (beyond the occasional multi-line commandline) |
Yup, basically. Fundamentally I don't believe that running So this is confusing to 1. new people, who have only learned that you do And if I write sh scripts, I fire up bash and do a lot of line-by-line testing, so I would be running
I like fish scripting and want it to be used more and easier to use and viable for more things. If I didn't like fish scripting I would probably not work on fish. I have to confess I am a bit taken aback by your position here. My position stays: What this currently does (add mentions of the non-fish docs) is fine, I would make it consistent with what we already have in the test man page (either way around, tho I have a slight preference for adding it at the top and only in the man page) and I would probably ditch the posix link because it's not relevant. |
When writing scripts for other shells, it can be confusing and annoying
that our
man
function shadows other manual pages, for exampleexec(1p)
from Linux man-pages. I almost never want to see the fish variant for such
contended cases (which obviuosly don't include fish-specific commands like
string
, only widely-known shell builtins).For the contented cases like
exec
, the POSIX documentation is moresubstantial and useful, since it describes a (sub)set of languages widely
used for scripting.
Because of this I think we should stop overriding the system's man pages.
Nowadays we offer
exec -h
as intuitive way to show the documentation forthe fish-specific command (note that
help
is not a good replacement becauseit uses a web browser).
Looking through the contended commands, it seems like for most of them,
the fish version is not substantially different from the system version.
A notable exception is
read
but I don't think it's a very important one.So I'm saying: we can sacrifice a bit of the native fish-scripting experience
in exchange for playing nicer with the outside world. I think the latter
is more important because scripting is not our focus, the way I see it.
So maybe put our manpath at the end.
In lieu of that, we should at least have
exec.rst
reference the system orPOSIX variants, which is what this draft patch does, to set the stage.