We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently the documentation recommends setting the shell title this way:
PS1=$ PROMPT_COMMAND= echo -ne "\033]0;New Title\a"
This sucks, because it sets PS1 to $. It would be much better to do this:
$
export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' echo -ne '\033]0;New Title\a'
This way, the command prompt stays the way it is, but setting the title still works.
Even better, add this to the end of ~/.bashrc:
~/.bashrc
settitle () { export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' echo -ne '\033]0;'"$1"'\a' }
What this does is it adds the command settitle that can be used at any time to change the window title like so:
settitle
settitle 'New Title'
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered:
PS1
Successfully merging a pull request may close this issue.
Currently the documentation recommends setting the shell title this way:
This sucks, because it sets PS1 to
$
. It would be much better to do this:This way, the command prompt stays the way it is, but setting the title still works.
Even better, add this to the end of
~/.bashrc
:What this does is it adds the command
settitle
that can be used at any time to change the window title like so:Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: