Closed MiguelGoncalves98 closed 3 years ago
This is a known bug, in the mean time you can use quotes to get arround this ex. wttab -t Bot2 'npm run launch:bot2'
. It would be nice to add support for quotless commands while passing other parameters.
I tried doing so, and intended to say I did it, but maybe the message was poorly phrased. When I tried to put the quotes, the Powershell interpreted it as 3 seperate commands, essentially it ran 'npm' first, then 'run', and then 'launch:bot2'! That, of course, yielded some errors :(
What terminal do you try to launch?
I ran it on windows terminal, which was using Powershell.
First of all, I am sorry if this is me being unable to grasp something basic about the functionality of "wttab".
Essentially, I had a script in my "package.json file" to do the following bit of code.
The first script ("tab:launch:bot1") that used only the "ls" command worked fine, however, the second ("tab:launch:bot2") that ran a command separated by spaces was getting messed up, as the Powershell was separating them commas. I tried to escape the spaces, to put the command between (') and none of it seemed to work. Once again, I am sorry if this is me being unable to grasp anything obvious.
I ended up adding a little bit of a hacky solution (seen below, highlighted), that essentially checks if the command has content separated by spaces and interprets it as a single, joint command.
I'm sure this is not the way to do it, and it may even cause problems for other cases, I just found a way to fix it for what I wanted.
Anyways, I would like to know if this had a simpler and more elegant solution, if it was something I missed, or if there was another way to workaround it.
Thanks in advance!