trzsz / trzsz-ssh

trzsz-ssh ( tssh ) is an ssh client designed as a drop-in replacement for the openssh client. It aims to provide complete compatibility with openssh, mirroring all its features, while also offering additional useful features. Such as login prompt, batch login, remember password, automated interaction, trzsz, zmodem(rz/sz), udp mode like mosh, etc.
https://trzsz.github.io/ssh
MIT License
1.74k stars 102 forks source link

ssh自动补全 #91

Closed YiuTerran closed 8 months ago

YiuTerran commented 8 months ago

直接使用ssh或者scp命令时,可以按tab自动补全匹配的host。用tssh代替ssh之后,这个功能就没有了,不太方便,希望能加回来。

lonnywong commented 8 months ago

你是安装了哪个软件来实现 ssh 自动补全的?可以试试将 tssh 改名为 ssh 来用。

YiuTerran commented 8 months ago

@lonnywong 是zsh自带的功能。我用了你的方案,把tssh改成ssh放在/usr/local/bin下,自动补全可以用了。

不过还是建议有个不那么trick的方案。

lonnywong commented 8 months ago

这个是 zsh 的实现逻辑,不是 ssh 的逻辑,tssh 也没法做。

YiuTerran commented 8 months ago

@lonnywong 可以参考这里:https://opensource.com/article/18/3/creating-bash-completion-script