Ignore -e if it is specified on the command line.

This is for compatibility with broken software that assumes terminals
should run with an -e option to execute commands instead of just passing
the commands as arguments. Fixes #502
This commit is contained in:
Kovid Goyal 2018-05-03 08:41:39 +05:30
parent 8d51edec17
commit 45fc1ace0c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 13 additions and 1 deletions

View File

@ -54,6 +54,10 @@ version 0.9.1 [future]
- Fix tab title not changing to reflect the window title when switching between different windows in a tab
- Ignore -e if it is specified on the command line. This is for compatibility
with broken software that assumes terminals should run with an -e option to
execute commands instead of just passing the commands as arguments.
version 0.9.0 [2018-04-15]
------------------------------

View File

@ -145,6 +145,11 @@
--debug-config
type=bool-set
Print out information about the system and kitty configuration.
--execute -e
type=bool-set
!
'''
@ -330,12 +335,15 @@ def wa(text, indent=0, leading_indent=None):
if isinstance(opt, str):
a('{}:'.format(title(opt)))
continue
help_text = opt['help']
if help_text == '!':
continue # hidden option
a(' ' + ', '.join(map(green, sorted(opt['aliases']))))
if not opt.get('type', '').startswith('bool-'):
blocks[-1] += '={}'.format(italic(opt['dest'].upper()))
if opt.get('help'):
defval = opt.get('default')
t = opt['help'].replace('%default', str(defval))
t = help_text.replace('%default', str(defval))
wa(prettify(t.strip()), indent=4)
if defval is not None:
wa('Default: {}'.format(defval), indent=4)