Search This Blog

Thursday, June 29, 2023

Windows Terminal (wt.exe) - Powershell with SSH terminal emulation

 wanted to get openssh to format correctly in powershell.

Discovered that you can change the terminal emulation using the environment variable.

$env:TERM = 'xterm'


But wanted to just have this applied when I started the session.

So using the Windows Terminal I created a new profile (duplicating the pwsh profile).

Then changing the Command Line to 

"C:\Program Files\PowerShell\7\pwsh.exe" -noexit -command "& {$env:TERM='xterm';}"


Share/Bookmark