Spring Roo
  1. Spring Roo
  2. ROO-2457

Add ! command or equivalent to execute OS commands

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.4.RELEASE
    • Fix Version/s: 1.2.0.M1
    • Component/s: @ ROO SHELL
    • Labels:
      None

      Description

      I'm an old unix hacker, and whenever I am working in an environment with a specialized shell, I take advantage of the OS escape of a ! command. Could we implement that in the Roo shell, so if I'm trying to remember the name of a file, I can execute:

      roo> !ls src/main/java/com/foo/bar
      one two three
      roo>

      Maybe not super relevant but I thought it might be helpful and I can keep the number of shells down while I'm working.

        Activity

        Hide
        Stefan Schmidt added a comment -

        Hi Ken,

        This is really the kind of functionality that can easily be added through an external add-on. To prove my point I just took 20 mins to create a simple addon and publish it to Google code and RooBot.

        roo> addon search commands
        2 found, sorted by rank; T = trusted developer; R = Roo 1.1 compatible
        ID T R DESCRIPTION -------------------------------------------------------------
        01 Y Y 0.1.1.RELEASE A simple add-on to allow execution of native OS commands
               from the Roo shell
        02 - Y 0.7.0 Site structure management for Spring MVC based web layer
        --------------------------------------------------------------------------------
        [HINT] use 'addon info id --searchResultId ..' to see details about a search result
        [HINT] use 'addon install id --searchResultId ..' to install a specific search result, or
        [HINT] use 'addon install bundle --bundleSymbolicName TAB' to install a specific add-on version
        roo> addon install id 1
        Target resource(s):
        -------------------
           spring-roo-os-commands (0.1.1.RELEASE)
        
        Deploying...done.
        
        Successfully installed add-on: spring-roo-os-commands [version: 0.1.1.RELEASE]
        [Hint] Please consider rating this add-on with the following command:
        [Hint] addon feedback bundle --bundleSymbolicName net.stsmedia.roo.addon.oscommands --rating ... --comment "..."
        
        roo> ! ls
        WEB-INF
        log.roo
        pom.xml
        src> 
        target
        

        Note the add-on has not been extensively tested given I just created it. But it seems to work fine for me so far on OSX. Feel free to fork it or contribute to it should you need more functionality.

        I'll go ahead and close this ticket.

        Show
        Stefan Schmidt added a comment - Hi Ken, This is really the kind of functionality that can easily be added through an external add-on. To prove my point I just took 20 mins to create a simple addon and publish it to Google code and RooBot. roo> addon search commands 2 found, sorted by rank; T = trusted developer; R = Roo 1.1 compatible ID T R DESCRIPTION ------------------------------------------------------------- 01 Y Y 0.1.1.RELEASE A simple add-on to allow execution of native OS commands from the Roo shell 02 - Y 0.7.0 Site structure management for Spring MVC based web layer -------------------------------------------------------------------------------- [HINT] use 'addon info id --searchResultId ..' to see details about a search result [HINT] use 'addon install id --searchResultId ..' to install a specific search result, or [HINT] use 'addon install bundle --bundleSymbolicName TAB' to install a specific add-on version roo> addon install id 1 Target resource(s): ------------------- spring-roo-os-commands (0.1.1.RELEASE) Deploying...done. Successfully installed add-on: spring-roo-os-commands [version: 0.1.1.RELEASE] [Hint] Please consider rating this add-on with the following command: [Hint] addon feedback bundle --bundleSymbolicName net.stsmedia.roo.addon.oscommands --rating ... --comment "..." roo> ! ls WEB-INF log.roo pom.xml src> target Note the add-on has not been extensively tested given I just created it. But it seems to work fine for me so far on OSX. Feel free to fork it or contribute to it should you need more functionality. I'll go ahead and close this ticket.
        Hide
        Stefan Schmidt added a comment -

        Reopening as we decided this feature would make a good Roo core add-on.

        Show
        Stefan Schmidt added a comment - Reopening as we decided this feature would make a good Roo core add-on.
        Hide
        Stefan Schmidt added a comment - - edited

        This functionality is now present as a new add-on (addon-oscommands). For any suggestions / problems - please log in a separate ticket.

        Git commit a4afab72627c956b3e8acbfa5ceb74e0ce175f55.

        Show
        Stefan Schmidt added a comment - - edited This functionality is now present as a new add-on (addon-oscommands). For any suggestions / problems - please log in a separate ticket. Git commit a4afab72627c956b3e8acbfa5ceb74e0ce175f55.

          People

          • Assignee:
            Stefan Schmidt
            Reporter:
            Ken Rimple
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: