I have a cygwin script from which I need to launch a command in Windows command prompt. The command is quite complex (lots of parameters). The way I do it is to write a .bat file from cygwin where I put the command and launch that .bat with the command 'cygstart "$WINDIR\explorer.exe" "myBat.bat"'.
The problem is that in the cmd that is opened, I want the user to be able to run again that command, eventually changing one of the many parameters. But the command does not remain in the history.
If Windows command prompt would have had support for programatically updating the history of commands, I would have added in the .bat file the command in history before calling it and this would have saved me. But there is no such support.
So the only option I see is to have the .bat file only fill the newly opened console with the command and having the user to hit enter to execute it. This will add the command in the history and make it available for future use.
Is this possible?