CLI - Revisit Ctrl-C and Ctrl-D handling

Version 3

    Revisit Ctrl-C and Ctrl-D handling in CLI

     

    Analysis

    Summary

    Exiting when Ctrl-C is typed in all cases seems not the best UX. CLI should align to bash like behavior.

    Requirements

    Ctrl-C CLI behaviour (similar to bash):

    • If auto-connect is enabled (-c option). If prompt occurs for credentials, typing Ctrl-C should exit the CLI process
    • As soon as we have reached the CLI prompt,Ctrl-C will NOT exit the CLI whatever the use-case.
    • Ctrl-C sent to terminal without any command running print a new line and new prompt.
    • Ctrl-C sent to terminal with command running interrupts the running command, print a new line and new prompt.
    • Ctrl-D sent to terminal without any text typed-in, the CLI exits.
    • Ctrl-D sent to terminal with some text typed-in, does nothing.

     

    Design Notes

    Some tests will have to be updated to send Ctrl-D and Ctrl-C when appropriate.

    General

    Product Issue(s)

    https://issues.jboss.org/browse/EAP7-741

    Upstream Issue(s)

    https://issues.jboss.org/browse/WFCORE-2896

     

    Developer Contacts

    Jean-François Denise (jdenise@redhat.com)