mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Add support for RemoteCommand option in kitten ssh
This commit is contained in:
parent
c60ed85cdd
commit
9b02a59c4e
4 changed files with 73 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue