File less-429-shell.patch of Package less
Index: less-608/filename.c
===================================================================
--- less-608.orig/filename.c 2022-07-22 19:26:24.000000000 +0000
+++ less-608/filename.c 2023-02-07 15:07:55.521151736 +0000
@@ -572,7 +572,7 @@ shellcmd(cmd)
#if HAVE_SHELL
char *shell;
- shell = lgetenv("SHELL");
+ shell = lgetenv("LESSSHELL");
if (!isnullenv(shell))
{
char *scmd;
Index: less-608/less.hlp
===================================================================
--- less-608.orig/less.hlp 2022-07-22 19:26:24.000000000 +0000
+++ less-608/less.hlp 2023-02-07 15:07:55.522151863 +0000
@@ -103,7 +103,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.
|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.
v Edit the current file with $VISUAL or $EDITOR.
Index: less-608/less.nro
===================================================================
--- less-608.orig/less.nro 2022-07-22 19:26:24.000000000 +0000
+++ less-608/less.nro 2023-02-07 15:07:55.522151863 +0000
@@ -443,7 +443,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 "| <m> shell-command"
@@ -2044,7 +2044,7 @@ compatible mode.
.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-608/lsystem.c
===================================================================
--- less-608.orig/lsystem.c 2022-07-22 19:26:24.000000000 +0000
+++ less-608/lsystem.c 2023-02-07 15:07:55.523151990 +0000
@@ -124,13 +124,13 @@ lsystem(cmd, donemsg)
/*
* 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);