ターミナルタブからname@osを削除する

ターミナルタブからname@osを削除する

name@osターミナルタブの内容を削除する方法は?スペースを占めます。

赤い丸は、端末ウィンドウで不要な部分を示します。

タブでパスを見たいです。どうすればいいですか?

ベストアンサー1

変更する必要がありました.bashrc。コメントアウトされた部分は、元のディストリビューション(Linux Mint)で設定した方法でした。

case "$TERM" in
xterm*|rxvt*)
  # PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\w\a\]$PS1"
    ;;
*)
    ;;
esac

\u方法ユーザーそして\h意味所有者

記録のためにここに.bashrc私の定義の完全な部分がありますPS1。最初はプロンプトを変更し、2番目はタブを変更します。

# ...

if [ "$color_prompt" = yes ]; then
  # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    PS1='\[\e[1;37;44m\]>\[\e[00m\] '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# 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"
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\w\a\]$PS1"
    ;;
*)
    ;;
esac

# ...

おすすめ記事