Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unix 在Cloud9IDE中重命名终端_Unix_Cloud9 Ide - Fatal编程技术网

Unix 在Cloud9IDE中重命名终端

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

当我运行多个窗口时,在终端名称中看到“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-titles-string "#T"
    tmux set-option set-titles on
    # set terminal title
    echo -ne "\033]0;$@\007"
}
然后运行
setTitle“我的终端名”

有时bash提示符(
PS1
)包含
\033]0\007
同样,在这种情况下,您需要修改它,以不允许覆盖setTitle函数设置的标题