Created
October 24, 2023 08:23
-
-
Save merlos/2fe7fbd17202c6c4328032f14b666efa to your computer and use it in GitHub Desktop.
Change the title of a term and get it
This file contains 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
# | |
# to set the title of the current terminal. (tested on OSX, but should work on linux terminal too) | |
# | |
echo -e "\033]0;This is my title\a" | |
# | |
# To get the title (OSX) | |
# | |
title=`osascript -e 'tell application "Terminal" to get name of front window'` | |
echo $title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment