unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.81k stars 271 forks source link

support multi-word arguments in `run` command #5417

Open aryairani opened 1 month ago

aryairani commented 1 month ago

Is your feature request related to a problem? Please describe. @etorreborre> How do you quote arguments with the run command? Say your command is run mymain "my first arg" "my second arg" and you want "my first arg" and "my second arg" to be passed as strings despite the spaces.

@kylegoetz> Best I can tell, it's not possible unless you Text.join with " " and then re parse. That's what I've been doing.

Previous attempt at https://github.com/unisonweb/unison/pull/3878

Describe the solution you'd like Devise and implement some quoting mechanism for run.

Also see https://github.com/unisonweb/unison/issues/2805, https://github.com/unisonweb/unison/issues/5193, relating to "numbered args" substitution, which we probably don't want at all for run, beyond the first arg that specifies the program to run.

Describe alternatives you've considered A possible workaround by launching from the command-line, using the shell's treatment of quoted args also doesn't work, at minimum because we can't specify projects there yet, https://github.com/unisonweb/unison/issues/4253

Additional context