mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-15 21:14:35 +02:00
Enable CWD reporting in bash integration
This commit is contained in:
@@ -274,8 +274,13 @@ PS1="{ps1}"
|
||||
pty.send_cmd_to_child('printf "%s\x16\a%s" "a" "b"')
|
||||
pty.wait_till(lambda: pty.screen_contents().count(ps1) == 2)
|
||||
self.ae(pty.screen_contents(), f'{ps1}printf "%s^G%s" "a" "b"\nab{ps1}')
|
||||
self.assertTrue(pty.screen.last_reported_cwd.endswith(self.home_dir))
|
||||
pty.send_cmd_to_child('echo $HISTFILE')
|
||||
pty.wait_till(lambda: '.bash_history' in pty.screen_contents())
|
||||
q = os.path.join(self.home_dir, 'testing-cwd-notification')
|
||||
os.mkdir(q)
|
||||
pty.send_cmd_to_child(f'cd {q}')
|
||||
pty.wait_till(lambda: pty.screen.last_reported_cwd.endswith(q))
|
||||
|
||||
for ps1 in ('line1\\nline\\2\\prompt> ', 'line1\nprompt> ', 'line1\\nprompt> ',):
|
||||
with self.subTest(ps1=ps1), self.run_shell(
|
||||
|
||||
Reference in New Issue
Block a user