Unix 在Cloud9IDE中重命名终端
当我运行多个窗口时,在终端名称中看到“bash-”username“是非常无用的,有没有办法重命名这些窗口?您可以向bashrc添加以下函数Unix 在Cloud9IDE中重命名终端,unix,cloud9-ide,Unix,Cloud9 Ide,当我运行多个窗口时,在终端名称中看到“bash-”username“是非常无用的,有没有办法重命名这些窗口?您可以向bashrc添加以下函数 setTitle() { # configure tmux to allow xterm set title sequence tmux set-window-option automatic-rename off tmux set-option allow-rename off tmux set-option set-t
setTitle() {
# configure tmux to allow xterm set title sequence
tmux set-window-option automatic-rename off
tmux set-option allow-rename off
tmux set-option set-titles-string "#T"
tmux set-option set-titles on
# set terminal title
echo -ne "\033]0;$@\007"
}
然后运行setTitle“我的终端名”
有时bash提示符(PS1
)包含\033]0\007
同样,在这种情况下,您需要修改它,以不允许覆盖setTitle函数设置的标题