mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
ssh kitten: Add an option to change the cwd at login
This commit is contained in:
@@ -142,9 +142,10 @@ copy --exclude */w.* d1
|
||||
tset = '$A-$(echo no)-`echo no2` "something"'
|
||||
for sh in self.all_possible_sh:
|
||||
with self.subTest(sh=sh), tempfile.TemporaryDirectory() as tdir:
|
||||
os.mkdir(os.path.join(tdir, 'cwd'))
|
||||
pty = self.check_bootstrap(
|
||||
sh, tdir, test_script='env; exit 0', SHELL_INTEGRATION_VALUE='',
|
||||
ssh_opts={'env': {
|
||||
sh, tdir, test_script='env; pwd; exit 0', SHELL_INTEGRATION_VALUE='',
|
||||
ssh_opts={'cwd': '$HOME/cwd', 'env': {
|
||||
'A': 'AAA',
|
||||
'TSET': tset,
|
||||
'COLORTERM': DELETE_ENV_VAR,
|
||||
@@ -152,6 +153,7 @@ copy --exclude */w.* d1
|
||||
)
|
||||
pty.wait_till(lambda: 'TSET={}'.format(tset.replace('$A', 'AAA')) in pty.screen_contents())
|
||||
self.assertNotIn('COLORTERM', pty.screen_contents())
|
||||
pty.wait_till(lambda: '/cwd' in pty.screen_contents())
|
||||
|
||||
def test_ssh_leading_data(self):
|
||||
script = 'echo "ld:$leading_data"; exit 0'
|
||||
|
||||
Reference in New Issue
Block a user