I was very pleased with your implementation of CP/M container and how naturally it fits into a command line environment. Well done!
This pull requests adds a command line option "--exec" that causes the application to run a single command, if provided, and exit.
The newly introduced functionality makes it somewhat easier to integrate cpm is the cross-platform (retro) development environments (be they IDE-based or vim) in which the sources are edited and kept in a version control system outside, but the compilers are run within the CP/M container.
Please note, that with the introduction of the new option, the "command" token remains optional, meaning that ./cpm --exec is effectively a no-op call that is similar to ./cpm bye. I decided against putting an error check in main.c against this combination for now.
I have made an effort to reduce the changes to the bare minimum.
I was very pleased with your implementation of CP/M container and how naturally it fits into a command line environment. Well done!
This pull requests adds a command line option "--exec" that causes the application to run a single command, if provided, and exit.
The newly introduced functionality makes it somewhat easier to integrate cpm is the cross-platform (retro) development environments (be they IDE-based or vim) in which the sources are edited and kept in a version control system outside, but the compilers are run within the CP/M container.
Please note, that with the introduction of the new option, the "command" token remains optional, meaning that
./cpm --exec
is effectively a no-op call that is similar to./cpm bye
. I decided against putting an error check inmain.c
against this combination for now.I have made an effort to reduce the changes to the bare minimum.
Sample commands:
cpm --exec dir
cpm --exec gen80 hello.gen