geofffranks / spruce

A BOSH template merge tool
MIT License
433 stars 78 forks source link

Grab command split over multiple lines #330

Closed tamanna2702 closed 3 years ago

tamanna2702 commented 4 years ago

My use case :

https://play.spruce.cf/#ba206e885042de0b7717e3153afda82e

As you see here, I have a lot of entries to grab which are around 20. And mentioning all of them in a single line doesn't look very clean, so I wanted to know if there is a way I can mention them over new lines like below:

fruit:
  name: apple
  key: (( grab $apple 
$grape 
$orange 
$mango))

The above doesn't work, but is there a way to have it over separate lines as I have a lot of entries?

geofffranks commented 4 years ago

Maybe try making the grab call a multi-line yaml string? Or possibly look into the join operator to pull a bunch of items from a yaml list into a single string

Sent from my iPhone

On Jun 10, 2020, at 6:04 AM, TAnna notifications@github.com wrote:

 My use case :

https://play.spruce.cf/#ba206e885042de0b7717e3153afda82e

As you see here, I have a lot of entries to grab which are around 20. And mentioning all of them in a single line doesn't look very clean, so I wanted to know if there is a way I can mention them over new lines like below:

fruit: name: apple key: (( grab $apple $grape $orange $mango)) The above doesn't work, but is there a way to have it over separate lines as I have a lot of entries?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tamanna2702 commented 4 years ago

Thanks, I tried both the options :

i)Multi-line yaml string:

https://play.spruce.cf/#5ac561c9e64db8ce4952b72fc3b3c51a

ii) Join operator:

https://play.spruce.cf/#6aa4b8a22578a087fb101f4144c42b42

Can't make it work. Any suggestions?

geofffranks commented 3 years ago

closing as stale