-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
None
Previous Artificer versions had two capabilities that may be useful for aesh itself.
1.) log-to-file: Logs the entire shell session to a file. This already exists (mostly) with "aesh.historyfile"
2.) batch execution: Executes all commands in the given file (ie, a previous historyfile).
For the most part, this is already possible within aesh. But, there are a few improvements that could make it more powerful.
- Simply reuse "aesh.historyfile", but document its use for this new purpose.
- Allow historyfile to be overwritten (enable w/ a new property)
- Automatically create historyfile if it doesn't exist
- Create new "aesh.executefile" property. If given, execute the commands in the file. Files can be historyfiles or hand-written.
Already possible: aesh < <file> - After executing a file, automatically exit the shell, by default. Perhaps make that configurable as well. The point is that executing a batch file, then leaving the shell session open, seems a bit unnatural.
If the above is used, this is already the case. - Allow system property interpolation in the files. For instance, $filePath in the script, and -DfilePath=/foo/file when executing.
This is partially available. There's an "export" command, which is translated wherever the variable is used. But, support for system properties, like the above example, would be helpful.