Created
May 24, 2025 16:01
-
-
Save gustavomdsantos/1e8e28191220f2e5ffe023b136968bee to your computer and use it in GitHub Desktop.
~/.bashrc snippet for changing window terminal title. Original source: https://www.baeldung.com/linux/current-tab-title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set-title() { | |
if [[ -z "$ORIG" ]]; then | |
ORIG=$PS1 | |
fi | |
TITLE="\[\e]2;$*\a\]" | |
PS1=${ORIG}${TITLE} | |
} | |
set-title "Terminal - $PWD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment