Adding $VISUAL check
This commit is contained in:
@@ -106,13 +106,16 @@ def main():
|
|||||||
_logger.info('%s, %s', sys.executable, sys.version)
|
_logger.info('%s, %s', sys.executable, sys.version)
|
||||||
env = [
|
env = [
|
||||||
('$DISPLAY', os.getenv('DISPLAY')),
|
('$DISPLAY', os.getenv('DISPLAY')),
|
||||||
|
('$TERM', os.getenv('TERM')),
|
||||||
('$XDG_CONFIG_HOME', os.getenv('XDG_CONFIG_HOME')),
|
('$XDG_CONFIG_HOME', os.getenv('XDG_CONFIG_HOME')),
|
||||||
|
('$RTV_EDITOR', os.getenv('RTV_EDITOR')),
|
||||||
|
('$RTV_URLVIEWER', os.getenv('RTV_URLVIEWER')),
|
||||||
|
('$RTV_BROWSER', os.getenv('RTV_BROWSER')),
|
||||||
('$BROWSER', os.getenv('BROWSER')),
|
('$BROWSER', os.getenv('BROWSER')),
|
||||||
('$PAGER', os.getenv('PAGER')),
|
('$PAGER', os.getenv('PAGER')),
|
||||||
('$RTV_EDITOR', os.getenv('RTV_EDITOR')),
|
('$VISUAL', os.getenv('VISUAL')),
|
||||||
('$RTV_URLVIEWER', os.getenv('RTV_URLVIEWER'))]
|
('$EDITOR', os.getenv('EDITOR'))]
|
||||||
_logger.info('Environment: %s', env)
|
_logger.info('Environment: %s', env)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Add an empty handler so the logger doesn't complain
|
# Add an empty handler so the logger doesn't complain
|
||||||
logging.root.addHandler(logging.NullHandler())
|
logging.root.addHandler(logging.NullHandler())
|
||||||
|
|||||||
@@ -569,7 +569,10 @@ class Terminal(object):
|
|||||||
fp.write(data)
|
fp.write(data)
|
||||||
_logger.info('File created: %s', filepath)
|
_logger.info('File created: %s', filepath)
|
||||||
|
|
||||||
editor = os.getenv('RTV_EDITOR') or os.getenv('EDITOR') or 'nano'
|
editor = (os.getenv('RTV_EDITOR') or
|
||||||
|
os.getenv('VISUAL') or
|
||||||
|
os.getenv('EDITOR') or
|
||||||
|
'nano')
|
||||||
command = shlex.split(editor) + [filepath]
|
command = shlex.split(editor) + [filepath]
|
||||||
try:
|
try:
|
||||||
with self.suspend():
|
with self.suspend():
|
||||||
|
|||||||
Reference in New Issue
Block a user