• VIM's 'cq' command (Was: Is 'cd -' to be considered (in ksh, bash) depr

    From Kenny McCormack@21:1/5 to the help on Mon Oct 31 17:09:46 2022
    In article <[email protected]>,
    ...
    It takes an optional
    argument to specify a non-zero status (including 0).

    ":help cq" to see the documentation.

    The argument must be in newer Vim versions; none is documented for Vim
    8.0, and it rejects arguments or prefixes.

    Yes. My Vim 7.4 is the same. 'cq' is there, but the N option isn't.

    However, in Vim 9.0.180, the help says:

    :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.
    {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.

    What is funny is that the ! seems to be a no-op; it does exactly the same
    thing with or without the !. Why mention it at all?

    --
    (Cruz certainly has an odd face) ... it looks like someone sewed pieces of a waterlogged Reagan mask together at gunpoint ...

    http://www.rollingstone.com/politics/news/how-america-made-donald-trump-unstoppable-20160224

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)