I'm writing an application from which I want to run a user-specified pager. The standard way to do this seems to be to look at the PAGER
environment variable.
I'm unclear as to whether this is a program name or a program name together with arguments. I tried to find standards mentioning this, but could not.
My gut feeling is that I should split on spaces and execute. Am I correct? I have come across various programs that assume environment variables like $PAGER
and $EDITOR
are program names without environment variables.
Perhaps I should execute with sh
instead though?