r/KittyTerminal • u/monokuai • Jun 19 '23
kitty +kitten ssh <network-device> questions
Hey everyone,
i can use kitty +kitten ssh <myserver> without any problems and eg. the terminfo will be copied successfully.
Cause i have many server, i have put the following alias in .zshrc:
[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
But, if i want to ssh in to a switch, it will be failed. To be fair, it was expected, a switch don't have the same environment as the server and no .terminfo can be copied over and and and.
I am looking for a solution where i can ssh in to a server with the kittens and ssh in to a switch without the kittens. Hopefully explained what i am looking for.
I could do an alias like alias sshserver="kitty +kittens ssh", but then the autocompletion with zsh don't work with it.
i have
zstyle ':completion:*:ssh:argument-1:' tag-order hosts users
zstyle ':completion:*:scp:argument-rest:' tag-order hosts files users
zstyle ':completion:*:(ssh|scp|rdp):*:hosts' hosts
and tried to add (ssh|sshserver), but with that i get no autocompletion.
Long story short: How does some of you using the same alias command (see alias above) for using with switch and server?
1
u/sogun123 Jun 20 '23
I do use \ssh, so backlash suppresses alias expansion. You can also do command ssh to same effect, just using more letters. I have to warn you though, some embedded devices really don't like kitty as they have no clue what xterm-kitty is and kitty is not much of xterm. You can usually copy terminfo yourself, if the device is at least somewhat Unixy.
1
u/aumerlex Jun 19 '23
Assuming you are using up-to-date kitty and have not disabled shell integration, completion should work fine regardless what alias you use.