Can I propose a sugared syntax for defining a function containing only shell commands. Currently we have this:
function foo()
return {
# shell commands only
}
end
I think this would be nicer like so:
function foo() {
# shell commands only
}
The two would be equivalent; the latter would be syntax sugar for the former. I think this would make the scripting language even more integrated with the shell language, i.e. it would feel even more natural to mix the two while still keeping the two separate. What do you think?
Can I propose a sugared syntax for defining a function containing only shell commands. Currently we have this:
I think this would be nicer like so:
The two would be equivalent; the latter would be syntax sugar for the former. I think this would make the scripting language even more integrated with the shell language, i.e. it would feel even more natural to mix the two while still keeping the two separate. What do you think?