Windows PowerShell で curl すると謎コマンドになる
Windows PoworShell での curl
Windows PowerShell で curl 使おうとしたら、なんかInvoke-WebRequestのエイリアスだよって言われた。
https://devadjust.exblog.jp/22690878/
👆 ということらしいので、curl.exeと入力して使っていた。
よくexe忘れて怒られてた。
PowerShell Core での curl
PowerShell Core (pwsh.exe) に乗り換えたら、curl がInvoke-WebRequestのエイリアスじゃなくなってた。
https://github.com/PowerShell/PowerShell/blob/0e1160d20f47d094a663abdaf6aa8c6de663b6b4/src/System.Management.Automation/engine/InitialSessionState.cs#L4709
👆PowerShell Core ではInvoke-WebRequestをiwrにエイリアスしてるっぽい。
まとめ
古いWindows Powershellだとcurlがエイリアスとして使われている
PowerShell するなら PowerShell Core を使うべき
というかビルトインの PowerShell を PowerShell Core にしてほしい😀
#Windows