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

后端 未结 4 723
庸人自扰
庸人自扰 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:52

    VER>NUL
    

    works for me.

    For example,

    MKDIR . || VER>NUL
    

    issues an error message, but it sets %ERRORLEVEL% to 0.

提交回复
热议问题