File less-429-shell.patch of Package less.34274
Index: less-643/filename.c
===================================================================
--- less-643.orig/filename.c
+++ less-643/filename.c
@@ -550,7 +550,7 @@ static FILE * shellcmd(char *cmd)
#if HAVE_SHELL
char *shell;
- shell = lgetenv("SHELL");
+ shell = lgetenv("LESSSHELL");
if (!isnullenv(shell))
{
char *scmd;
Index: less-643/less.hlp
===================================================================
--- less-643.orig/less.hlp
+++ less-643/less.hlp
@@ -104,7 +104,7 @@
___<_n_a_m_e_> Display the setting of an option, by name.
+_c_m_d Execute the less cmd each time a new file is examined.
- !_c_o_m_m_a_n_d Execute the shell command with $SHELL.
+ !_c_o_m_m_a_n_d Execute the shell command with $LESSSHELL.
#_c_o_m_m_a_n_d Execute the shell command, expanded like a prompt.
|XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command.
s _f_i_l_e Save input to a file.
Index: less-643/less.nro
===================================================================
--- less-643.orig/less.nro
+++ less-643/less.nro
@@ -459,7 +459,7 @@ current file.
A pound sign (#) is replaced by the name of the previously examined file.
"!!" repeats the last shell command.
"!" with no shell command simply invokes a shell.
-On Unix systems, the shell is taken from the environment variable SHELL,
+On Unix systems, the shell is taken from the environment variable LESSSHELL,
or defaults to "sh".
On MS-DOS and OS/2 systems, the shell is the normal command processor.
.IP "# shell-command"
@@ -2281,7 +2281,7 @@ automatically when running in
.IP PATH
User's search path (used to find a lesskey file
on MS-DOS and OS/2 systems).
-.IP SHELL
+.IP LESSSHELL
The shell used to execute the !\& command, as well as to expand filenames.
.IP TERM
The type of terminal on which
Index: less-643/lsystem.c
===================================================================
--- less-643.orig/lsystem.c
+++ less-643/lsystem.c
@@ -121,13 +121,13 @@ public void lsystem(char *cmd, char *don
/*
* Pass the command to the system to be executed.
- * If we have a SHELL environment variable, use
+ * If we have a LESSSHELL environment variable, use
* <$SHELL -c "command"> instead of just <command>.
* If the command is empty, just invoke a shell.
*/
#if HAVE_SHELL
p = NULL;
- if ((shell = lgetenv("SHELL")) != NULL && *shell != '\0')
+ if ((shell = lgetenv("LESSSHELL")) != NULL && *shell != '\0')
{
if (*cmd == '\0')
p = save(shell);