elvish icon indicating copy to clipboard operation
elvish copied to clipboard

No man pages

Open tinywombat765 opened this issue 6 years ago • 5 comments

As far as I can tell Elvish doesn't ship with man pages for the shell or it's builtins

tinywombat765 avatar Dec 08 '18 06:12 tinywombat765

No manual pages, but the documentation at https://elv.sh/ref/ is top notch. I usually just look things up there. However, as the sources are in Markdown, it should be possible to render it in man page format fairly easily.

zzamboni avatar Dec 11 '18 17:12 zzamboni

It'd be incredible to have documentation you can quickly pull up right from the elvish shell -- it'd make it much quicker to learn the language. I'd be happy to help render the existing documentation to man pages if that's the right approach for elvish.

(fish, emacs, and ipython all handle this well, tho in very different ways)

jtmoulia avatar Feb 11 '19 17:02 jtmoulia

With respect to @jtmoulia's comment I'll point out that fish has a man function that prefaces the directory containing the man pages for its builtins to the $MANPATH env var before invoking the real man command. It is a borderline trivial function that depends on little more than the fish man pages being in a predictable location embedded in the fish binary at build time; i.e., set -l fish_manpath (dirname $__fish_datadir)/fish/man. Where $__fish_datadir is a semi-private builtin var. Elvish shouldn't, obviously, do it exactly the same way. The point is that by using a similar model it is not only possible to support man elvish but also man count and man other-random-builtin when typed in an elvish REPL session. How to extend this to extensions provided by epm is TBD.

krader1961 avatar Apr 16 '20 02:04 krader1961

Note that a help command will be merged in the near future. That addresses the question of how to get the documentation for embedded (i.e., builtin) commands in an interactive context. Obviously, it might still be useful to have the equivalent of https://elv.sh/ref/command.html as a "man" page but it's not clear there is enough value to justify doing so.

krader1961 avatar Aug 09 '22 03:08 krader1961

#1432 is not enough. Making doc:show to be help is a start. 3rd party module don't have documentation either.

iacore avatar Apr 27 '23 01:04 iacore