Bash in Git for Windows: Weirdness when running a command with CMD.exe /C with args

前端 未结 7 2261
后悔当初
后悔当初 2020-12-05 02:55

This is more of an annoyance rather than a problem but I would very much like to understand the semantics here.

All I want to do is to run an arbitrary command on a

7条回答
  •  臣服心动
    2020-12-05 03:09

    Because you mention that you're using the Git for Windows bundle, I figured I'd point out that it includes winpty, which seems to be quite readable.

    $ winpty echo test
    test
    
    $ site="Default Web Site"
    $ winpty 'C:\Windows\System32\inetsrv\appcmd' list site "${site}" /text:ID
    1
    

提交回复
热议问题