我有一个用于登录服务器的小脚本.我换了钥匙.adminstirator设置的默认值为emacs.我有点沉迷于vi键绑定.我无法以自己身份登录,我必须以群组用户身份登录.大部分时间我做的第一件事就是输入set -o vi.我忘了并开始使用vi键绑定,但它们工作,然后我必须使用emacs键绑定.我的肌肉记忆搞砸了.当我使用登录脚本登录时,自动设置密钥绑定会很棒.
无论如何我试图将set命令添加到我的ssh脚本中.
这个不起作用.
#!/bin/bash ssh -q -T bighost <这个不起作用
#!/bin/bash ssh bighost bash -c "' set -o vi '"这让我ssh到主机,但vi没有设置为键绑定.
#!/bin/bash ssh -t bighost "$(< set -o vi )" corp_user@bighost:~$ set -o allexport off braceexpand on emacs on errexit off errtrace off functrace off hashall on histexpand on history on ignoreeof off interactive-comments on keyword off monitor on noclobber off noexec off noglob off nolog off notify off nounset off onecmd off physical off pipefail off posix off privileged off verbose off vi off xtrace off corp_user@big_host:~$我甚至试过这样的事情:
ssh corp_user@bighost "$( < . ~/woogie)woogie中有"set -o vi".可以这样做吗?