From 741cfcebf357a53e287c152b76adc7ff1986ebf3 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Fri, 24 Jul 2009 00:41:02 -0400 Subject: [PATCH] better term overriding --HG-- branch : pmacs2 --- application.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application.py b/application.py index 934f5d3..2a62692 100755 --- a/application.py +++ b/application.py @@ -1111,8 +1111,6 @@ if __name__ == "__main__": help='open arguments in MODE') parser.add_option('-x', '--exec', action='callback', callback=exec_cb, type='string', metavar='CMD', help='run CMD after launching') - parser.add_option('-T', '--term', dest='term', metavar='TYPE', - help='force pmacs to use TERM=TYPE') (opts, args) = parser.parse_args(argv) @@ -1121,8 +1119,8 @@ if __name__ == "__main__": mode.DEBUG = True # override $TERM if we need to - if opts.term: - os.putenv('TERM', opts.term) + if os.getenv('PMC_TERM'): + os.putenv('TERM', os.getenv('PMC_TERM')) # if -b but no -m, then use -m hex if opts.binary and not opts.mode: