Skip to content

Syntax sugar for function containing shell commands #46

@no-more-secrets

Description

@no-more-secrets

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions