如何在 Git Bash 中运行 Windows 命令提示符实用程序选项(如何指定 /slash 选项)?

Gre*_*een 5 bash git command-line

一个在 Git Bash 中不起作用但仅在 Windows 提示符中起作用的示例:

// Git Bash
$ ipconfig /all
Error: unrecognized or incomplete command line.

// Windows
User> ipconfig /all
C:\Users\sergey>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : HOST-12345
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : NodeType
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   ... so on
Run Code Online (Sandbox Code Playgroud)

如何在 Git Bash 等中提供/all斜杠/renew选项

Set*_*eth 6

将斜线更改为破折号。至少它在 Windows 7 的 1.9.4 上对我有用。

$ ipconfig -all
Run Code Online (Sandbox Code Playgroud)

/或者使用 来逃避\/

$ ipconfig \/all
Run Code Online (Sandbox Code Playgroud)

  • 逃脱对我不起作用,但冲刺却成功了。谢谢! (2认同)