-
-
Notifications
You must be signed in to change notification settings - Fork 162
Command vs Expression Mode
oil: Lexical State.
elvish: prefix syntax for arithmetic. So there's only one mode? Code can get lispy because () is command substitution.
The shell language for single commands is almost identical, but the rest is homoiconic syntax? There is a math
command for infix, e.g. math '1.2 + 3.4'
.
Switching between syntaxes
In command syntax it is possible to switch to code syntax in one of the following ways:
Mish is a sublanguage within Mash for launching processes, with a similar syntax to a traditional shell.
By default, Mash is in "regular Mash" mode. If a command line starts or ends with !, the entire line is interpreted as a Mish command. If ! is issued by itself as a command, then Mash toggles into Mish by default, and the prompt changes from a $ to a !.