-
I searched through all open and closed issues, as well as the docs, and it surprisingly seems as though this has never come up before (if so, apologies). Is it possible to craft a command name that contains special characters / tokens that otherwise break The colon character is frequently used in Node development, and you will often find {
"scripts": {
"build:prod": "build.js --prod --minify",
"build:dev": "build.js --dev --source-map --verbose"
}
} Where running If you try to replicate these names in
Is there a way around this? I realize that switching from I do see some docs on escaping, but they seem to only apply to the body of commands, not the command name. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Good question! Currently, recipe names must be valid Since the I would suggest using dashes, i.e., |
Beta Was this translation helpful? Give feedback.
Good question!
Currently, recipe names must be valid
just
identifiers, which are of the form[a-zA-Z_][a-zA-Z0-9_-]*
, so it isn't possible to use:
in a recipe name.Since the
package.json
file is JSON, and script names are Javascript strings, there aren't any restrictions on their contents, whereasjust
recipe names have to be distinguished from other parts of thejust
language, i.e. the lexer needs to be able to tell where a recipe name ends and the:
after the name begins, so there are more restrictions on recipe name contents.I would suggest using dashes, i.e.,
foo-bar
. It's a pinky reach, but you don't have to press the shift key, so it's kind of a wash.