Created a batch file
title.bat
@echo off
prompt $P$G
doskey cd=cd $* ^& for %%i in (.) do @title %%~nxi
and appended it to the Developer Command Prompt profile within Windows Terminal:
cmd.exe /k "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Tools\VsDevCmd.bat" -startdir=none -arch=x64 -host_arch=x64 && C:\Users\johndoe\Documents\title.bat
This ensures that every time you change directories using the cd command, the tab title dynamically reflects the new current working directory:
Is there a simpler way to achieve that?
