forked from aniani/vim
patch 8.2.0095: cannot specify exit code for :cquit
Problem: Cannot specify exit code for :cquit. Solution: Add optional argument. (Thinca, Yegappan Lakshmanan, closes #5442)
This commit is contained in:
@@ -229,8 +229,17 @@ processing a quickfix or location list command, it will be aborted.
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cq* *:cquit*
|
||||
:cq[uit][!] Quit Vim with an error code, so that the compiler
|
||||
will not compile the same file again.
|
||||
:cq[uit][!]
|
||||
:{N}cq[uit][!]
|
||||
:cq[uit][!] {N} Quit Vim with error code {N}. {N} defaults to one.
|
||||
Useful when Vim is called from another program:
|
||||
e.g., a compiler will not compile the same file again,
|
||||
`git commit` will abort the committing process, `fc`
|
||||
(built-in for shells like bash and zsh) will not
|
||||
execute the command, etc. will not compile the same
|
||||
file again.
|
||||
{N} can also be zero, in which case Vim exits
|
||||
normally.
|
||||
WARNING: All changes in files are lost! Also when the
|
||||
[!] is not used. It works like ":qall!" |:qall|,
|
||||
except that Vim returns a non-zero exit code.
|
||||
|
||||
Reference in New Issue
Block a user