How do I make the apple terminal window auto change colour scheme when I ssh to a specific server

前端 未结 10 1798
甜味超标
甜味超标 2020-12-12 12:58

When I ssh into a remote production server I would like the colour scheme of my terminal window to change to something brigh and scary, preferably red, to warn me that I am

10条回答
  •  既然无缘
    2020-12-12 13:48

    You can set the $PS1 variable in your .bashrc.

    red='\e[0;31m'
    PS1="$\[${red}\]"
    

    EDIT: To do this open the Terminal. Then say

    #touch .bashrc
    

    You can then open .bashrc in textEdit or in TextWrangler and add the previous commands.

提交回复
热议问题