0
我的主機名列表開始WEB1,web2上,...,web200,web201.myserver.ltd等我可以使用通配符的bash別名SSH
我已經在的.ssh/config中使用:
Host *
User myuser
和resolv.conf中:
search myserver.ltd
因此,而不是使用ssh [email protected]
我可以使用ssh web200
問題:有什麼辦法可以在我的.zshrc文件中設置通配符別名,因此當我鍵入web200時,它會執行ssh web200? (同樣適用於任何以webxxx開頭的服務器
我知道我可以通過爲每個webxxx服務器使用單獨的別名來設置它,但我正在尋找一條線(或幾條線)來實現這一點。
大,它的工作需要感謝您 –
偉大的答案,這將在Bash工作也是如此。看到這篇文章:https://superuser.com/questions/787424/hook-into-command-not-found-handler-in-ubuntu – codeforester