Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.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
Bash 使用ssh shell自定义窗口/选项卡标题_Bash_Ubuntu_Ssh_Terminal - Fatal编程技术网

Bash 使用ssh shell自定义窗口/选项卡标题

Bash 使用ssh shell自定义窗口/选项卡标题,bash,ubuntu,ssh,terminal,Bash,Ubuntu,Ssh,Terminal,我使用许多打开的窗口和选项卡。为了让它们保持笔直,我想在它们的标题中添加一些特定的词,这样就可以在它们之间快速切换。在终端仿真器程序中更改首选项对于连接到本地计算机非常有效。但是当使用ssh连接到远程机器时,我的首选项被忽略了。每次我执行cd命令时,shell窗口标题和选项卡标题都会更改。由于,我了解到远程计算机的bash首选项(.bashrc)控制着标题。通过注释下面的代码,输入到emulator程序首选项中的自定义窗口/选项卡标题似乎是持久的 # If this is an xterm se

我使用许多打开的窗口和选项卡。为了让它们保持笔直,我想在它们的标题中添加一些特定的词,这样就可以在它们之间快速切换。在终端仿真器程序中更改首选项对于连接到本地计算机非常有效。但是当使用ssh连接到远程机器时,我的首选项被忽略了。每次我执行cd命令时,shell窗口标题和选项卡标题都会更改。

由于,我了解到远程计算机的bash首选项(.bashrc)控制着标题。通过注释下面的代码,输入到emulator程序首选项中的自定义窗口/选项卡标题似乎是持久的

# If this is an xterm set the title to user@host:dir
# case "$TERM" in
# xterm*|rxvt*)
#     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
#     ;;
# *)
#     ;;
# esac