File less-429-shell.patch of Package less
---
filename.c | 2 +-
less.hlp | 2 +-
lsystem.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
Index: less-676/filename.c
===================================================================
--- less-676.orig/filename.c 2025-04-16 21:56:56.000000000 +0200
+++ less-676/filename.c 2025-04-25 13:37:10.333952009 +0200
@@ -553,7 +553,7 @@
#if HAVE_SHELL
constant char *shell;
- shell = lgetenv("SHELL");
+ shell = lgetenv("LESSSHELL");
if (!isnullenv(shell))
{
char *scmd;
Index: less-676/less.hlp
===================================================================
--- less-676.orig/less.hlp 2025-04-16 21:56:56.000000000 +0200
+++ less-676/less.hlp 2025-04-25 13:37:10.334552439 +0200
@@ -113,7 +113,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-676/lsystem.c
===================================================================
--- less-676.orig/lsystem.c 2025-04-16 21:56:56.000000000 +0200
+++ less-676/lsystem.c 2025-04-25 13:37:10.334851222 +0200
@@ -120,13 +120,13 @@
/*
* 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);