Skip to content

Instantly share code, notes, and snippets.

@merlos
Created October 24, 2023 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save merlos/2fe7fbd17202c6c4328032f14b666efa to your computer and use it in GitHub Desktop.
Save merlos/2fe7fbd17202c6c4328032f14b666efa to your computer and use it in GitHub Desktop.
Change the title of a term and get it
#
# 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