Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I usually have multiple Bash tabs open in Terminal, and I needed a quick way to see what each tab contained. The following bash script will set the Title of the tab.

  #!/bin/bash
  # Sets the title of the Terminal Window / Tab.
  # title foo => Sets the title of the Terminal Window / Tab to foo. 
  echo -n -e "\033]0;$1\007"


Should anyone be wondering why this doesn't work in fish, it seems it overwrites the title back to the default pretty much instantly. So no custom tab names with fish, it seems!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: