diff options
author | Norbert Preining <preining@logic.at> | 2010-09-10 14:34:06 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-09-10 14:34:06 +0000 |
commit | 6e00b8d5b304a09a59b4e7d2fa2535dbd831af7e (patch) | |
tree | c6d80910586a6c9ce19861de16dfac71a9d0a34c /Master/texmf | |
parent | b079e05f637ac414e6c2b001d608f4cd6fe89ecd (diff) |
tlmgr: add -R if LESS is already defined in the environment
git-svn-id: svn://tug.org/texlive/trunk@19638 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 5f049a10117..0d939e5297f 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -260,8 +260,12 @@ sub main { } # in some cases LESSPIPE of less breaks control characters # and the output of pod2usage is broken. - # We set LESS=-R in the environment and unset LESSPIPE to be sure - $ENV{'LESS'} = "-R"; + # We add/set LESS=-R in the environment and unset LESSPIPE to be sure + if (defined($ENV{'LESS'})) { + $ENV{'LESS'} .= " -R"; + } else { + $ENV{'LESS'} = "-R"; + } delete $ENV{'LESSPIPE'}; delete $ENV{'LESSOPEN'}; if ($action && ($action ne "help")) { |