elves / elvish

Powerful scripting language & versatile interactive shell
https://elv.sh/
BSD 2-Clause "Simplified" License
5.63k stars 299 forks source link

The initialization script(s) need to be better documented #1176

Closed krader1961 closed 2 years ago

krader1961 commented 3 years ago

There was a recent discussion on Gitter about Elvish initialization scripts. It began with this question:

If the command-line starting elvish specifies zero startup-files, how many startup-files, if present, does elvish process?

To which I replied:

Hmmm, it's not documented particularly well. There are just a couple of oblique mentions in the docs; e.g., https://elv.sh/learn/cookbook.html and https://elv.sh/ref/language.html.

When I started using Elvish I also found it hard to learn that ~/.elvish/rc.elv was the only initialization script and it is only read by interactive Elvish shells. In fact, this question is an example where a traditional man page would likely make it much easier for a new Elvish user to answer what is a very common question about any shell.

xiaq commented 2 years ago

This is now documented in https://elv.sh/ref/command.html. (I also added a sentence to say explicitly that Elvish doesn't evaluate rc.elv when running a script).

Manpage is tracked in #786.