Get your tabs together!

Philipp Scheit
2 min readSep 3, 2022

(How to change the title of tabs in Windows terminal, when you are using WSL2)

If you are like me, you have a dozen of open tabs in your windows terminal…

Lots of tabs, all with the same title

That’s a problem, cause most of the time, these are not tabs in the same directory.. some are running a background job, some are connecting to servers, and some are different projects.

It’s a mess finding the right tab if every tab is named the same

But luckily, there is a command that helps you to organize:

#!/usr/bin/env bashecho -en "\033]0;$1\a"

let’s save it as title and use it:

title "my new tab title"

nice, right?

If you use a lot of 12-factor apps, you probably have heard about direnv, yet? Check it out, it makes life SO MUCH easier. It will load environment variables (or execute scripts) when you enter a local directory.

Given you installed that, create a .envrc in your project and put:

title "my project"

Now when you change the directory to your project (and you do direnv allow . for once), your tab title will change based on the project directory.

You can also change the title of the tab when you execute a long-running command, or you connect to a server

title "on server pegasus" && ssh root@pegasus

You get the gist.

organized tabs ❤

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Philipp Scheit
Philipp Scheit

Written by Philipp Scheit

Senior Web Developer — Entrepreneur — yaymemories.com

No responses yet

Write a response