parent
6890e265b6
commit
896f93822d
@ -1700,7 +1700,11 @@ class Boss:
|
||||
cmd = [kitty_exe(), '@']
|
||||
aw = self.active_window
|
||||
if aw is not None:
|
||||
kw['env'] = {'KITTY_SHELL_ACTIVE_WINDOW_ID': str(aw.id)}
|
||||
env = {'KITTY_SHELL_ACTIVE_WINDOW_ID': str(aw.id)}
|
||||
at = self.active_tab
|
||||
if at is not None:
|
||||
env['KITTY_SHELL_ACTIVE_TAB_ID'] = str(at.id)
|
||||
kw['env'] = env
|
||||
if window_type == 'tab':
|
||||
tab = self._new_tab(SpecialWindow(cmd, **kw))
|
||||
if tab is not None:
|
||||
|
||||
@ -185,7 +185,11 @@ def real_main(global_opts: RCOptions, encrypter: CommandEncrypter = NoEncryption
|
||||
print('Use {} for assistance or {} to quit'.format(green('help'), green('exit')))
|
||||
awid = os.environ.pop('KITTY_SHELL_ACTIVE_WINDOW_ID', None)
|
||||
if awid is not None:
|
||||
print(f'The ID of the previously active window is: {awid}')
|
||||
atid = os.environ.pop('KITTY_SHELL_ACTIVE_TAB_ID', None)
|
||||
am = f'Previously active window id: {awid}'
|
||||
if atid is not None:
|
||||
am += f' and tab id: {atid}'
|
||||
print(am)
|
||||
|
||||
pre_prompt = set_window_title('The kitty shell') + set_cursor_shape('bar')
|
||||
pre_prompt += f'\x1b]133;A;redraw={0 if is_libedit else 1}\x1b\\'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user