diff --git a/config/xonsh/aliases.py b/config/xonsh/aliases.py index eac8bb3..f62ee16 100644 --- a/config/xonsh/aliases.py +++ b/config/xonsh/aliases.py @@ -1,6 +1,7 @@ from os.path import dirname from os import environ from pathlib import Path +from shutil import which import subprocess from socket import gethostname import colors @@ -39,6 +40,13 @@ def run(cmd: list[str], cwd: Path = Path.cwd(), exit_on_error: bool = True, env: def _sudo(args): return ["sudo", "--", *aliases.eval_alias(args)] +@aliases.register +@aliases.return_command +def _ssh(args): + if which("kitten"): + return ["kitten", "ssh", *args] + return ["ssh", *args] + @aliases.register def _vm(args): if not args: