【问题标题】:Rename a terminal in the Cloud9 IDE在 Cloud9 IDE 中重命名终端
【发布时间】:2016-07-21 20:18:12
【问题描述】:

当我运行多个窗口时,在终端名称中看到 'bash - "username"' 毫无用处,有没有办法重命名这些窗口?

【问题讨论】:

    标签: unix cloud9-ide


    【解决方案1】:

    您可以将以下函数添加到您的 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 "my terminal name"

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-10
      • 1970-01-01
      相关资源
      最近更新 更多