Closed robo9k closed 9 years ago
This change uses docopt.rs to parse command line arguments for the chip8_ui executable. From chip8_ui --help the invocation now needs to look like:
chip8_ui
chip8_ui --help
CHIP-8 user interface. Usage: chip8_ui [--] <rom> | - chip8_ui -h | --help chip8_ui -V | --version Options: -h, --help Show this screen. -V, --version Show version.
This means that the intro.ch8 file will no longer be the default when no ROM argument is provided - this is now an error (Invalid arguments.).
intro.ch8
Invalid arguments.
As noted in https://github.com/chip8-rust/chip8-ui/issues/26#issuecomment-89614962 the intro should still be distributed. Since there is currently no cargo install or similar and we do not provide downloads (e.g. via CI builds) either, this is an unresolved TODO.
cargo install
TODO
One can now also use stdin as a ROM source, e.g. via useless-use-of-cat like
stdin
$ cat src/intro/intro.ch8 | ./target/debug/chip8_ui -
While the --version option uses the crate's version (i.e. from Cargo.toml), this does not provide useful information at the moment, since it's been fixed as 0.0.1 ever since (since we never published a release, related to #13).
--version
Cargo.toml
0.0.1
Reviewed, looks great! Feel free to merge after CI as I'm offline from now.
This change uses docopt.rs to parse command line arguments for the
chip8_ui
executable. Fromchip8_ui --help
the invocation now needs to look like:This means that the
intro.ch8
file will no longer be the default when no ROM argument is provided - this is now an error (Invalid arguments.
).As noted in https://github.com/chip8-rust/chip8-ui/issues/26#issuecomment-89614962 the intro should still be distributed. Since there is currently no
cargo install
or similar and we do not provide downloads (e.g. via CI builds) either, this is an unresolvedTODO
.One can now also use
stdin
as a ROM source, e.g. via useless-use-of-cat likeWhile the
--version
option uses the crate's version (i.e. fromCargo.toml
), this does not provide useful information at the moment, since it's been fixed as0.0.1
ever since (since we never published a release, related to #13).