add kitten ssh
| ssh
alias
This commit is contained in:
parent
6d567a5e6e
commit
712c2c2163
1 changed files with 8 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue