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
在此先感謝。