TODO: Create a tmux wrapper PowerShell function for this. To close the window, press Ctrl+B, and then quickly hit X. It's the same in screen, except you press Ctrl+A to get its attention. Commands are given by pressing letters, numbers, punctuation marks, or arrow keys. For instance, wsl -d tmux_posh -e tmux rename-window host1. You then quickly press the next key to send a command to tmux. You can access tmux commands from within PowerShell by wsl -d tmux_posh -e tmux ![]() You could just use the default Alpine instance, but I like to have single-purpose WSL instances, similar to Docker containers. I create a new, cloned WSL instance for PowerShell tmux. I use this as the base for the tmux feature, since it has very low overhead (less than 12MB, including tmux). You don't have to enable WSL2 just WSL v1 will work fine for this (and perhaps better than WSL2). There are several ways to set this up, but here's how I'm doing it at the moment: ![]() abduco is in many ways very similar to dtach but is actively maintained, contains no legacy code, provides a few. However, you can attach multiple clients at once, as long as the original remains open. independently from its controlling terminal. ![]() If the original session is disconnected, re-attaching will result in a broken pipe.Most of the features you'd normally expect from tmux, including: Set-window-option -g automatic-rename off In a WSL instance with tmux installed, set up your ~/.nf with: set -g default-command "cd $(pwsh.exe -c 'Write-Host -NoNewLine \$env:userprofile' | xargs -0 wslpath) exec pwsh.exe -nologo" Although it wasn't possible when this question was originally asked, with Windows Subsystem for Linux, it's now possible to use a "real" tmux to manage PowerShell windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |