[JBoss JIRA] (SRAMP-573) Ctrl+C should not exit the CLI
by David virgil naranjo (JIRA)
[ https://issues.jboss.org/browse/SRAMP-573?page=com.atlassian.jira.plugin.... ]
David virgil naranjo commented on SRAMP-573:
--------------------------------------------
As well as i talked with brett in irc, would be good to have a undeploy or undo method per command that can be executed when an interrupted exception is thrown.
> Ctrl+C should not exit the CLI
> ------------------------------
>
> Key: SRAMP-573
> URL: https://issues.jboss.org/browse/SRAMP-573
> Project: S-RAMP
> Issue Type: Bug
> Reporter: Brett Meyer
> Assignee: David virgil naranjo
>
> If you mistype a command in the CLI, I'd expect Ctrl+C to clear it. Instead, it exits the shell completely. Instead, limit that to Ctrl+D. Block Ctrl+C from exiting and ensure it clears the current partially-typed command.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (SRAMP-573) Ctrl+C should not exit the CLI
by David virgil naranjo (JIRA)
[ https://issues.jboss.org/browse/SRAMP-573?page=com.atlassian.jira.plugin.... ]
David virgil naranjo commented on SRAMP-573:
--------------------------------------------
What about Control+ D, exiting.
Ctrl-U and Ctrl-K clear the text
And for control +C we wait, as this is a more complex development.
I tried a solution using threads, creating a thread per command executed, and in case the Control+C is pressed trying to kill/stop the process. But it is not easy to kill a Thread in Java. It should be done using the Thread.interrupt().
> Ctrl+C should not exit the CLI
> ------------------------------
>
> Key: SRAMP-573
> URL: https://issues.jboss.org/browse/SRAMP-573
> Project: S-RAMP
> Issue Type: Bug
> Reporter: Brett Meyer
> Assignee: David virgil naranjo
>
> If you mistype a command in the CLI, I'd expect Ctrl+C to clear it. Instead, it exits the shell completely. Instead, limit that to Ctrl+D. Block Ctrl+C from exiting and ensure it clears the current partially-typed command.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (SRAMP-573) Ctrl+C should not exit the CLI
by Brett Meyer (JIRA)
[ https://issues.jboss.org/browse/SRAMP-573?page=com.atlassian.jira.plugin.... ]
Brett Meyer commented on SRAMP-573:
-----------------------------------
{quote}
Essentially it's like hitting Enter except the command that was typed is not executed.
{quote}
[~virchete], ^^^ that's a great way of describing what I was hoping for!
And +1 to Ctrl+D cleanly exiting. IIRC, last time I tried it you got an NPE
> Ctrl+C should not exit the CLI
> ------------------------------
>
> Key: SRAMP-573
> URL: https://issues.jboss.org/browse/SRAMP-573
> Project: S-RAMP
> Issue Type: Bug
> Reporter: Brett Meyer
> Assignee: David virgil naranjo
>
> If you mistype a command in the CLI, I'd expect Ctrl+C to clear it. Instead, it exits the shell completely. Instead, limit that to Ctrl+D. Block Ctrl+C from exiting and ensure it clears the current partially-typed command.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (SRAMP-573) Ctrl+C should not exit the CLI
by Eric Wittmann (JIRA)
[ https://issues.jboss.org/browse/SRAMP-573?page=com.atlassian.jira.plugin.... ]
Eric Wittmann commented on SRAMP-573:
-------------------------------------
Did a little testing on various shells here and yeah, Ctrl-C tends to simply abort whatever the user is currently doing. Essentially it's like hitting Enter except the command that was typed is *not* executed. That makes sense.
I think Ctrl-U and Ctrl-K would *also* be lovely to have.
> Ctrl+C should not exit the CLI
> ------------------------------
>
> Key: SRAMP-573
> URL: https://issues.jboss.org/browse/SRAMP-573
> Project: S-RAMP
> Issue Type: Bug
> Reporter: Brett Meyer
> Assignee: David virgil naranjo
>
> If you mistype a command in the CLI, I'd expect Ctrl+C to clear it. Instead, it exits the shell completely. Instead, limit that to Ctrl+D. Block Ctrl+C from exiting and ensure it clears the current partially-typed command.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (SRAMP-573) Ctrl+C should not exit the CLI
by Brett Meyer (JIRA)
[ https://issues.jboss.org/browse/SRAMP-573?page=com.atlassian.jira.plugin.... ]
Brett Meyer commented on SRAMP-573:
-----------------------------------
I guess I'm thinking more in terms of a console, such as Fuse, SSH, etc. Ctrl+C works exactly as it does in a normal OS terminal -- simply kills what you're currently working on or blows away the current line. Ctrl+D exits. But I get Eric's point. Thoughts?
> Ctrl+C should not exit the CLI
> ------------------------------
>
> Key: SRAMP-573
> URL: https://issues.jboss.org/browse/SRAMP-573
> Project: S-RAMP
> Issue Type: Bug
> Reporter: Brett Meyer
> Assignee: David virgil naranjo
>
> If you mistype a command in the CLI, I'd expect Ctrl+C to clear it. Instead, it exits the shell completely. Instead, limit that to Ctrl+D. Block Ctrl+C from exiting and ensure it clears the current partially-typed command.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month
[JBoss JIRA] (SRAMP-573) Ctrl+C should not exit the CLI
by Eric Wittmann (JIRA)
[ https://issues.jboss.org/browse/SRAMP-573?page=com.atlassian.jira.plugin.... ]
Eric Wittmann edited comment on SRAMP-573 at 10/30/14 9:20 AM:
---------------------------------------------------------------
Shouldn't Ctrl-U and Ctrl-K clear the text (from cursor to the start and end of the line, respectively)? Ctrl-C is SIGINT - shouldn't that exit the shell?
was (Author: eric.wittmann):
Shouldn't Ctrl-U clear the text? Ctrl-C is SIGINT - shouldn't that exit the shell?
> Ctrl+C should not exit the CLI
> ------------------------------
>
> Key: SRAMP-573
> URL: https://issues.jboss.org/browse/SRAMP-573
> Project: S-RAMP
> Issue Type: Bug
> Reporter: Brett Meyer
> Assignee: David virgil naranjo
>
> If you mistype a command in the CLI, I'd expect Ctrl+C to clear it. Instead, it exits the shell completely. Instead, limit that to Ctrl+D. Block Ctrl+C from exiting and ensure it clears the current partially-typed command.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 1 month