finalterm icon indicating copy to clipboard operation
finalterm copied to clipboard

Use $i instead of $$$i$$$ for command parameters

Open spamalot opened this issue 12 years ago • 2 comments

$ would need to be escapable, so

  • \$1 would render as $1, but
  • $1 would render as the first parameter

This would ultimately have three effects:

  1. Increased readability.
  2. No need for a close parameter tag.
  3. The ability to enter "$$$" as a parameter to a command, in the unlikely event that this is necessary.

In addition, quotes should automatically be placed around parameters during parsing, because parameters will always be surrounded by quotes. This will further reduce the bloat of '$$$i$$$' to simply $i.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

spamalot avatar Jul 11 '13 11:07 spamalot

In addition, quotes should automatically be placed around parameters during parsing, because parameters will always be surrounded by quotes. This will further reduce the bloat of '$$$i$$$' to simply $i.

With this part I don't agree. The idea is that the parameter $$$i$$$ is a placeholder for the text in any function, not necessarily only for shell commands.

The rest of the idea sounds good.

p-e-w avatar Jul 11 '13 15:07 p-e-w

I understand where you are coming from. I made the false assumption that because shell commands are the only ones that currently take parameters, it would stay that way. If only shell commands are to take parameters, I still think auto-quoting would be a good idea, but if other commands are expected to receive parameters, I agree with you completely.

spamalot avatar Jul 11 '13 16:07 spamalot