You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
Amelia allows replacing the built-in commands with method calls returning CommandDescriptor objects. However, it is not totally integrated with the language. A good option for more command-like extensibility would be allowing the user to define its own commands. It wouldn't be much difference with regard to the current implementation, although a new kind of statement or type declaration should be introduced. For instance:
subsystem Test {
define postgres (String action, String db, String user, String pass): [
returnUtility.execOnPostgres(action, db, user, pass)
]
define ls (String directory): [
returnCommands.generic("ls "+ directory);
]
...
on host {
init:
postgres "start""postgres""1234"
ls "/tmp"
}
}
Also a good thing would be to remove the need for using quotes to specify command arguments, although that can be difficult to validate (because of grammar ambiguities).
The text was updated successfully, but these errors were encountered:
Amelia allows replacing the built-in commands with method calls returning
CommandDescriptor
objects. However, it is not totally integrated with the language. A good option for more command-like extensibility would be allowing the user to define its own commands. It wouldn't be much difference with regard to the current implementation, although a new kind of statement or type declaration should be introduced. For instance:Also a good thing would be to remove the need for using quotes to specify command arguments, although that can be difficult to validate (because of grammar ambiguities).
The text was updated successfully, but these errors were encountered: