gave it a try and i get something like
g! pipe:run echo /content/blah/us/en / children cq:Page
{"items":["/content/blah/us/en/new_test_page","/content/blah/us/en/name"],"size":2}i had to switch from "|" to "/" as "|" is a "real" pipe and ironically it will be difficult to pass sling resource through that one. sending this now a few days before i push it in case someone has opinions (you never know) Le mer. 23 mai 2018 à 12:46, Robert Munteanu <[email protected]> a écrit : > On Wed, 2018-05-23 at 11:46 +0200, Nicolas Peltier wrote: > > What i'm unclear now is wether we should go the route of a provider > > for > > scripting in general, or "just" pipe (which is my direct interest), > > so > > something like a command where first argument specify a context, > > second is > > the actual script > > g! sling:script groovy println 'Hello World' > > g! sling:script groovy-pipe > > p.echo("/content/site").$("sling:resourceType='bar'").mv("/archives") > > > > or direct > > g! pipe:run > > echo("/content/site").$("sling:resourceType='bar'").mv("/archives") > > I would go with the second approach, unless there is a short-term plan > to add more commands. > > If we get more gogo shell commands we can always refactor later. > > Robert >
