jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-223

support `command arguments` notation (backticks) for executing scripts

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: parser
  • Labels:
    None

Description

We should support `cmd` to be syntax sugar for this...

"cmd".execute()

which returns an instance of java.lang.Process. In addition if this expression is used within a String it should make a GString which extracts the output of the command in the middle of the string.

e.g.

println "blah `command` blah"

it should behave like

println "blah ${`command`.text} blah"

Issue Links

is depended upon by

Task - A task that needs to be done. GROOVY-762 implement syntax improvements

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Guillaume Laforge added a comment - 02/Nov/07 5:11 AM

Not planned to be supported.
We can already execute commands easily with execute()

Show
Guillaume Laforge added a comment - 02/Nov/07 5:11 AM Not planned to be supported. We can already execute commands easily with execute()
Hide
Permalink
chris snow added a comment - 21/Jun/09 4:10 PM

I have found that writing shell scripts in groovy is too verbose, and have reluctantly decided to use jruby instead as it is much more succinct due to it's support of backticks.

Show
chris snow added a comment - 21/Jun/09 4:10 PM I have found that writing shell scripts in groovy is too verbose, and have reluctantly decided to use jruby instead as it is much more succinct due to it's support of backticks.

People

  • Assignee:
    Unassigned
    Reporter:
    james strachan
Vote (0)
Watch (0)

Dates

  • Created:
    26/Feb/04 4:47 AM
    Updated:
    21/Jun/09 4:10 PM
    Resolved:
    02/Nov/07 5:11 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.