def run(self, command_line=''):
assert command_line, 'expected non-empty command line'
if platform() == 'linux':
term = self.view.settings().get('VintageousEx_linux_terminal')
term = term or os.environ.get('COLORTERM') or os.environ.get("TERM")
if not term:
nvim.status_message('not terminal name found')
return
try:
self.open_shell([term, '-e', 'bash']).wait()
except Exception as e:
nvim.console_message(e)
nvim.status_message('error while executing command through shell')
return
elif platform() == 'osx':
term = self.view.settings().get('VintageousEx_osx_terminal')
term = term or os.environ.get('COLORTERM') or os.environ.get("TERM")
if not term:
nvim.status_message('not terminal name found')
return
try:
self.open_shell([term, '-e', 'bash']).wait()
except Exception as e:
nvim.console_message(e)
nvim.status_message('error while executing command through shell')
return
elif platform() == 'windows':
self.open_shell(['cmd.exe', '/k']).wait()
else:
# XXX OSX (make check explicit)
nvim.not_implemented_message('not implemented')
# https://vimhelp.appspot.com/insert.txt.html#:r
评论列表
文章目录