linux系统命令行或shell里面设置终端title标题(适用与ubuntu,centos)[转]

方法一:自定义方法在~/.bashrc中添加下面代码: 1 function set-title() { 2 if [[ -z "$ORIG" ]]; then 3 ORIG=$PS1 4 fi 5 TITLE="\[\e]2;$*\a\]" 6 PS1=${ORIG}${TITLE} 7 } 在命

posted on 2022-01-20 10:58  乘影  阅读(2270)  评论(0编辑  收藏  举报

导航