0
我有一个功能,我在网上找到要添加到我的.bashrc其滋生与主机名新的SSH会话:通过SSH创建一个新的屏幕窗口?
# Opens SSH on a new screen window with the appropriate name.
screen_ssh() {
numargs=$#
screen -t ${!numargs} ssh [email protected]
if [ $TERM == "screen" -o $TERM == "screen.linux" ] && [ ! -z "$PS1" ]; then
alias ssh=screen_ssh
fi
if [[ $- == *i* ]]
then
[ "$STY" ] && ssh() { screen -t "${1##*@}" ssh "[email protected]"; } # Spawn new window in Screen for SSH
fi
,但它也将做到这一点的别名,就像这样:
lsrem(){ ssh $1 "ls -l" ; }
所以我的问题是如何从别名/功能停止工作,并只用于交互工作:
ssh somehost
在此先感谢。