Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can actually wrap variables with {} (which functions just as a grouping construct in Elvish):

~> curl -s https://dl.elv.sh/{$platform:os}-{$platform:arch}/elvish-HEA.......

It's more verbose than quoting the dash so I opted to the latter.

You seem to use "elvishism" in a negative way, and this particular example is one of the more quirky ones, but the whole reason you would use Elvish is that it's different from other shells! :)



My apologies if the comment came across as negative. I just meant to say that I didn't want to exchange one set of shell quirks for another. But using {$x}-style grouping is a fine solution too. And in any case I'm sure that bash has a lot more quirks than Elvish :-)

So I'll definitely do more testing with Elvish and see what the overall experience is like. Coming from Solaris, we still have a ton of ksh scripts in our shop (with people working on them who have very different backgrounds and scripting skill levels). Something with less pitfalls than bash would be great... Thanks for putting in your time and effort!


Oh, I definitely didn't read your entire comment as negative, just the way you used "elvishism". Elvish definitely has its quirks! But I hope you'll find it a compelling package overall :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: