mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
Add support for RemoteCommand option in kitten ssh
This commit is contained in:
@@ -321,6 +321,11 @@ def main():
|
||||
os.environ.pop('KITTY_SHELL_INTEGRATION', None)
|
||||
cmd = base64.standard_b64decode(exec_cmd).decode('utf-8')
|
||||
exec_with_better_error(login_shell, os.path.basename(login_shell), '-c', cmd)
|
||||
remote_cmd = b'REMOTE_CMD'
|
||||
if remote_cmd:
|
||||
os.environ.pop('KITTY_SHELL_INTEGRATION', None)
|
||||
cmd = base64.standard_b64decode(remote_cmd).decode('utf-8')
|
||||
exec_with_better_error(login_shell, os.path.basename(login_shell), '-c', cmd)
|
||||
TEST_SCRIPT # noqa
|
||||
if ksi and 'no-rc' not in ksi:
|
||||
exec_with_shell_integration()
|
||||
|
||||
@@ -158,6 +158,8 @@ prepare_for_exec
|
||||
# If a command was passed to SSH execute it here
|
||||
EXEC_CMD
|
||||
|
||||
REMOTE_CMD
|
||||
|
||||
# Used in the tests
|
||||
TEST_SCRIPT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user