diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-12-05 16:02:12 -0800 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-02-10 17:14:45 +0100 |
commit | 73d8d54528dd78424561a7bde3030a133522a19a (patch) | |
tree | 9abddfc1b691e3d9c9282d5c2babfcf1650912b3 /doc | |
parent | 5775a3461a2a3008c6450cd666de835c7f9b197e (diff) |
doc: Add notes on CLI conventions
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/03010-conventions.md | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/src/03010-conventions.md b/doc/src/03010-conventions.md index 661745d1..ccee1323 100644 --- a/doc/src/03010-conventions.md +++ b/doc/src/03010-conventions.md @@ -91,6 +91,7 @@ whether the functionality could be outsourced to a more general All libraries should be tested as much as possible. Sometimes it may not be possible without a lot of effort, but still: more tests = better! + ## Commandline tools The commandline tools are the CLI-frontends for their respective libraries. @@ -99,10 +100,15 @@ So `libimagdiary` has a CLI frontend `imag-diary`. Those CLI frontends use functionality from `libimagrt` to build a commandline interface which is consistent with the rest of the ecosystem. -Commandline interfaces should receive store IDs as positional arguments. -Commandline interfaces should also provide a flag "-I" (that's a big i) which -marks that the store IDs shall be read from stdin and are not passed via the -commandline. +Commandline applications use the runtime interfaces for receiving IDs from the +CLI or IDs which are piped into the application. +Commandline applications use the 'stdin'/'stdout'/'stderr' wrappers provided by +the runtime (see section below). + +Commandline applications are _only_ interactive when specified by the user +(normally via a `--interactive` flag). An application _must_ provide the full +functionality via its commandline interface, thus it is not allowed to provide +functionality which is only usable in interactive mode. ### IO |