We can allow queries or include/exclude criteria to be part of a script definition. This makes it easier to reliably run more complex commands. We can also allow positional arguments in the queries or include/exclude lists.
For example, our upgrade script might look like this:
Complex commands may also use arrays instead of relying on shell-chaining. Arrays allow us to determine which part of a command failed and log that information instead of just logging that the whole command failed.
For example, our commit command might look like this:
Compound commands are often commands with tacit queries. We can extend our query language to handle checks like this: we might rewrite the above like so:
We can allow queries or include/exclude criteria to be part of a script definition. This makes it easier to reliably run more complex commands. We can also allow positional arguments in the queries or include/exclude lists.
For example, our upgrade script might look like this:
We can even do a limited form of command inheritance, not that it’s that useful:
Complex commands may also use arrays instead of relying on shell-chaining. Arrays allow us to determine which part of a command failed and log that information instead of just logging that the whole command failed.
For example, our commit command might look like this:
Compound commands are often commands with tacit queries. We can extend our query language to handle checks like this: we might rewrite the above like so: