You have misclassified PATH
and both EDITOR
and VISUAL
belong with it.
The idea that these variables belong to particular applications is wrong. They are standardized and usable by potentially any application that needs them.
- If any application wants to search a path for executable programs, it can use
PATH
. (And indeed this is the case for any application that calls execvp()
.)
- If any application wants to invoke a shell, it can use
SHELL
to find the program image file.
- If any application wants to invoke a line editor, it can use
EDITOR
.
- If any application wants to invoke a visual editor, it can use
VISUAL
.
- If any application wants to invoke a pager, it can use
PAGER
.
- If any application wants to know where the home directory is, it can use
HOME
.
And so on.
In contrast, HISTIGNORE
and PS1
do not even really need to be environment variables at all; and only the latter is even mentioned (albeit without explanation) in the standard. One can set them as environment variables, in a session-leader process or in some other top-level parent, and rely upon environment inheritance to have them imported by shells.
But one can instead just set them as shell variables, in a script automatically executed by every shell (the specifics depending from the shell), and not export them into the environment. For example: I have my ~/.zshrc
set PS1
and RPROMPT
as shell variables, and they are not exported to be environment variables at all.
Further reading