Cmder: Ctrl+C - Disable terminate batch job question

Created on 23 Feb 2018  Â·  5Comments  Â·  Source: cmderdev/cmder

One of the most annoying things when working with the Command Prompt on Windows is the Terminate batch job (Y/N)? question that has to be answered after pressing ctrl+c.
Some people are ok with pressing ctrl+c twice, but this doesn't always work.

Cmder brings the Unix workflow to Windows and a great feature would be to suppress this question.

There's a little project called CmdEx, which has exactly done that. Maybe the code could be mostly copied from that?

Thank you very much for considering.

Most helpful comment

Also discussed here #108
Probably what samvasko pointed to on that issue, there is a setting inside \cmder\config\settings file:

# name: Auto-answer terminate prompt
# type: enum
#  0 = Disabled
#  1 = Answer 'Y'
#  2 = Answer 'N'
# Automatically answers cmd.exe's 'Terminate batch job (Y/N)?' prompts. 0 =
# disabled, 1 = answer 'Y', 2 = answer 'N'.
terminate_autoanswer = 1

That should do the trick.

All 5 comments

Solution:

clink set terminate_autoanswer 1

or, read @edmundo096's answer: https://github.com/cmderdev/cmder/issues/1666#issuecomment-368946122

âš¡ Wiki page: https://github.com/cmderdev/cmder/wiki/Customization#terminate-batch-job-yn

👉 Note: Restart Cmder session to take effect.


@xelra Vote up for merging CmdEx into Cmder, alongside Clink!

This was somewhat previously commented on #1488

Also discussed here #108
Probably what samvasko pointed to on that issue, there is a setting inside \cmder\config\settings file:

# name: Auto-answer terminate prompt
# type: enum
#  0 = Disabled
#  1 = Answer 'Y'
#  2 = Answer 'N'
# Automatically answers cmd.exe's 'Terminate batch job (Y/N)?' prompts. 0 =
# disabled, 1 = answer 'Y', 2 = answer 'N'.
terminate_autoanswer = 1

That should do the trick.

Thanks @edmundo096! I added your solution to our wiki:

just run:

C:\Users\user\Documents$ clink set terminate_autoanswer 1
Settings 'terminate_autoanswer' set to '1'
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Joe1992w picture Joe1992w  Â·  3Comments

brunowego picture brunowego  Â·  3Comments

hyrious picture hyrious  Â·  3Comments

justinmchase picture justinmchase  Â·  3Comments

sathishsoundharajan picture sathishsoundharajan  Â·  3Comments