Grails
  1. Grails
  2. GRAILS-8813

exit either stops the app or exits the grails shell, also need a "restart" command

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0 final
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      osx 10.6.8, grails 2.0.0 from macports

      Description

      I use grails by starting the grails shell
      and then issuing commands from there: like "run-app"

      If I need to stop the app, then I type "exit"
      However if I type "exit" when the app is not currently running,
      then I get thrown out of the grails shell.

      Aka, the "exit" command does work in two completely different ways.

      I'd like to suggest:

      • "exit" should always exit the grails shell
      • "stop" should be used instead for stopping the app

      I'd also like to suggest some aliases:

      • "start" should be an alias for "run-app"
      • "run" should be an alias for "run-app"
      • "restart" should be an alias for "stop" followed by "start"
      • "stop-app" and "restart-app" might be useful for consistency

      As a side note,
      I tried hard to implement "restart" in terms of the current infrastructure,
      but it was not as easy as one might think...

        Activity

        Hide
        Eike Dierks added a comment -

        I'd like to add some research on the history of exiting a shell.

        Actually there are two types of shells around:

        • some are just an interactive interface around a command line [CL]
        • some behave like a real shell [SH]

        I want to suggest that the grails shell should behave like a fully fledged shell aka [SH]
        while it currently behaves like a user command aka [CL]

        Let's talk about the SIG_INT first (aka hitting Control-C)

        • [CL] should just quit
        • [SH] should be immune, but start a new line of input

        Let's talk about "eof" (aka Control-D)

        • with no character in the buffer, all shells should just exit
        • with a character in the buffer, real shells [SH] should show the possible completions.

        "quit"

        • neither bash nor tcsh understand quit
        • [CL] usually does understand quit
        • [SH] should explicitely NOT understand "quit" (while grails sh does)

        "exit"

        • [CL] understand "exit", to leave the command
        • [SH] understand "exit", to leave the shell
        Show
        Eike Dierks added a comment - I'd like to add some research on the history of exiting a shell. Actually there are two types of shells around: some are just an interactive interface around a command line [CL] some behave like a real shell [SH] I want to suggest that the grails shell should behave like a fully fledged shell aka [SH] while it currently behaves like a user command aka [CL] Let's talk about the SIG_INT first (aka hitting Control-C) [CL] should just quit [SH] should be immune, but start a new line of input Let's talk about "eof" (aka Control-D) with no character in the buffer, all shells should just exit with a character in the buffer, real shells [SH] should show the possible completions. "quit" neither bash nor tcsh understand quit [CL] usually does understand quit [SH] should explicitely NOT understand "quit" (while grails sh does) "exit" [CL] understand "exit", to leave the command [SH] understand "exit", to leave the shell

          People

          • Assignee:
            Unassigned
            Reporter:
            Eike Dierks
          • Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development