Comment 3 for bug 1927658

Revision history for this message
richard clarke (ncmprhnsbl) wrote :

i noticed in arch based systems the title was being set to an inital prompt based one..
looking into it showed this: in bashrc:
```
case ${TERM} in
  xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'

    ;;
  screen*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
    ;;
esac
```
(the printf part can of course be adjusted to suit)
i guess PROMPT_COMMAND is something window managers can understand..
not sure about other shells eg. this doesn't work directly with zshrc