Proposition: `-c` should use a single argument
Scripts passed inline to
-c should be in one single argument. ex:
ion -c echo hello world
ion -c 'echo hello world'
Extra parameters should be passed as @args
- No need to interpret user meaning, thus making the tool more obvious. ex: What should
ion -c echo hello '@args'print? Most would expect the literal '@args', not its expansion.
- Most if not all *nix CLI tools expect a single parameter after a short option
- Streamlines the API as positional parameters are always used in the same manner
- Use the standard (sh-like) -c format
- Breaking change. But as it is in alpha stage right now, it is the perfect moment IMO.
Wanna be cons:
- Useless nested quoting. But because arguments are stripped of their quotes, one also needs nested quoting in the current manner of things, simply in a more local way. ex:
ion -c echo "'"'Not expanded $(Hello World)'"'"
ion -c "echo '"'Not expanded $(Hello World)'"'"