I have a farily simple doskey macro
DOSKEY s="C:\Program Files (x86)\Git\bin\sh.exe" --login
So I could switch from command prompt to git shell by
But sometimes I only want to execute a single command in shell and return to command line. For that I either have to enter shell, do stuff, exit. Or I could modify the doskey macro
DOSKEY s="C:\Program Files (x86)\Git\bin\sh.exe" --login -c "$*"
But that would mean I can't use it to do the former now, i.e enter shell, it's for executing only now.
I was wondering if I could have it conditionally choose between the two based on whether or not I have passed it another argument. So
s would do the former, but
s echo hello would do the latter.
Is there a way to do this?