I'm writing a script to run on UBUNTU WSL in Windows. I use zsh as my shell, but bash could work too here.
I'd like that bash script to use wt.exe
(Windows Terminal) to open some new tabs.
Here's what I have so far:
#!/bin/bash
cmd.exe /c "wt.exe" \
new-tab --title 'a' --tabColor "#f00" wsl.exe "ls" \; \
new-tab --title 'b' --tabColor "#f33" wsl.exe zsh -is -c "ls" \; \
new-tab --title 'c' --tabColor "#f99" wsl.exe zsh -is "ls" \; \
new-tab --title 'd' --tabColor "#0f0" wsl.exe zsh -i -c "ls" \; \
new-tab --title 'e' --tabColor "#3f3" wsl.exe zsh -c "ls" \; \
new-tab --title 'f' --tabColor "#9f9" wsl.exe zsh "ls" \; \
You'll need Windows 10 w/ Ubuntu WSL and Windows Terminal for that to work.
This bash script opens a bunch of tabs.
- Tabs that
ls
immediately exit. - Tabs that error stick around.
- opening several tabs in different folders:
- run a command (yarn dev)
- cancel that command (ctrl-c) and have the terminal interactive instead of exit.
I got this to work on previous version of these tools, but they changed.
What's the new way?