What's the Windows command shell equivalent of Bash's `true` command?

后端 未结 4 767
庸人自扰
庸人自扰 2021-01-04 03:22

I have written a Vim plugin which shells out to run external commands. Two of the commands I run are diff and grep which can each exit with a non-z

4条回答
  •  长情又很酷
    2021-01-04 03:38

    true is roughly equivalent to (exit 0) (the parentheses create a subshell that exits with status 0, instead of exiting your current shell.

提交回复
热议问题