Option to control shell integration

This commit is contained in:
Kovid Goyal 2021-07-15 10:20:46 +05:30
parent bffe7aba8f
commit 2d93a011df
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 13 additions and 0 deletions

View File

@ -2560,6 +2560,14 @@ holding down ctrl+shift and clicking with the mouse. The special value of
''' '''
) )
opt('shell_integration', 'enabled',
long_text='''
Enable shell integration on supported shells. This enables features such as
jumping to previous prompts, browsing the output of the previous command in a
pager, etc. on supported shells. Set to ``disabled`` to turn off shell
integration, completely. See :ref:`shell_integration` for details.
''')
opt('term', 'xterm-kitty', opt('term', 'xterm-kitty',
long_text=''' long_text='''
The value of the TERM environment variable to set. Changing this can break many The value of the TERM environment variable to set. Changing this can break many

View File

@ -1128,6 +1128,9 @@ class Parser:
def shell(self, val: str, ans: typing.Dict[str, typing.Any]) -> None: def shell(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['shell'] = str(val) ans['shell'] = str(val)
def shell_integration(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['shell_integration'] = str(val)
def single_window_margin_width(self, val: str, ans: typing.Dict[str, typing.Any]) -> None: def single_window_margin_width(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['single_window_margin_width'] = optional_edge_width(val) ans['single_window_margin_width'] = optional_edge_width(val)

View File

@ -400,6 +400,7 @@ option_names = ( # {{{
'selection_background', 'selection_background',
'selection_foreground', 'selection_foreground',
'shell', 'shell',
'shell_integration',
'single_window_margin_width', 'single_window_margin_width',
'startup_session', 'startup_session',
'strip_trailing_spaces', 'strip_trailing_spaces',
@ -534,6 +535,7 @@ class Options:
selection_background: Color = Color(red=255, green=250, blue=205) selection_background: Color = Color(red=255, green=250, blue=205)
selection_foreground: typing.Optional[kitty.rgb.Color] = Color(red=0, green=0, blue=0) selection_foreground: typing.Optional[kitty.rgb.Color] = Color(red=0, green=0, blue=0)
shell: str = '.' shell: str = '.'
shell_integration: str = 'enabled'
single_window_margin_width: FloatEdges = FloatEdges(left=-1.0, top=-1.0, right=-1.0, bottom=-1.0) single_window_margin_width: FloatEdges = FloatEdges(left=-1.0, top=-1.0, right=-1.0, bottom=-1.0)
startup_session: typing.Optional[str] = None startup_session: typing.Optional[str] = None
strip_trailing_spaces: choices_for_strip_trailing_spaces = 'never' strip_trailing_spaces: choices_for_strip_trailing_spaces = 'never'