Skip to content

run unison expression in cli? #6134

@aryairani

Description

@aryairani

I couldn't find an existing ticket for this, although I kind of thought we had one.

Is your feature request related to a problem? Please describe.

It would be nice to be able to run io expressions directly from the ucm prompt rather than having to assign a name to each combination, even though they can be run from the scratch file without an add.

Related to #4758.
Related to #4851.

Describe the solution you'd like

maybe something like
> exec myfunc (my arg expression) arg3 ...
i.e.
> exec <expr string...>

takes the whole "expr str", parses it as if it were within a do in a scratch file, and tries to evaluate it, similar to run.

an command alias for exec could be > but it's not mandatory especially if there are parsing issues there

Describe alternatives you've considered

  • just keep using the scratch file and write these little main programs over and over and either throw them away or add them or accidentally add them,
  • write a program that takes strings, then use run using strings, and then match on the strings within the program to do different things

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions