aboutsummaryrefslogtreecommitdiff
path: root/docs/design.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/design.md')
-rw-r--r--docs/design.md29
1 files changed, 26 insertions, 3 deletions
diff --git a/docs/design.md b/docs/design.md
index 153bab0..82168e5 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -1,7 +1,8 @@
# krino design
Status: describes krino 0.0.1, 2026-09-13; amended 2026-09-14 for 0.0.2:
-duplicates are never deleted (§5.5).
+duplicates are never deleted (§5.5), and coloured output with `--no-color`
+(§8.2, §11).
krino (from Greek κρίνω, "to separate, to judge, to decide") sorts files in
chosen directories by rules. A rule tests a file's type, name, path, size,
@@ -424,8 +425,26 @@ not acted on: 3 busy · 12 ignored · 210 unmatched (-v lists them)
[a] apply all [c] choose per file [s] skip this directory [q] quit
```
-- Colours use the terminal's ANSI palette, only on a terminal, and never
- when `NO_COLOR` is set. Permanent deletes are always marked in capitals.
+- Colours use only the terminal's 16-colour ANSI palette plus bold and
+ faint, never 256-colour or RGB values, so the terminal's theme decides what
+ they look like. They appear only on a terminal, and never when `NO_COLOR`
+ is set or `--no-color` is given. What is styled:
+
+ | Element | Style |
+ |---|---|
+ | directory header `krino: NAME PATH`, and `krino: undo RUN` | bold |
+ | `copy`, `move`, `rename` | green |
+ | `trash` | yellow |
+ | `DELETE permanently`, and undo's `refused:` | bold red |
+ | a skipped step, and a match reason | faint |
+ | rule name | blue |
+ | the `warnings` heading and its lines | yellow |
+ | outcome line | the applied count green when above 0, the failed count red when above 0 |
+ | prompt keys `[a]` `[y]` … | bold |
+ | `krino log`'s `(undone)` | faint |
+
+ Permanent deletes are always marked in capitals, so they stand out without
+ colour too.
- A plan taller than the terminal is shown through `$PAGER` (default
`less -FRX`) and the prompt follows when the pager exits.
- Keys are read one at a time without Enter.
@@ -519,6 +538,7 @@ krino undo [RUN] reverse a run (default: the last one)
-v also list unmatched, ignored and busy files; full match reasons
--json with -n: the plan as JSON (format unstable before 1.0)
-c FILE use FILE instead of ~/.config/krino/krino.conf
+--no-color never colour the output, as when NO_COLOR is set
-h, --help help
--version print "krino 0.0.1"
```
@@ -652,6 +672,9 @@ placeholder numbers, screenshots by date, cleaning up old installers).
originals differ. Each case plans and applies in a temporary directory and
checks that every copy is still on disk.
- **CLI:** golden files for plan rendering without colour; exit codes.
+ With colour on, each styled element of §8.2 carries its escape and the
+ columns still line up; `--no-color`, before or after a subcommand, and
+ `NO_COLOR` each give output with no escape byte.
- **Parity check before release:** run `krino -n` beside the prototype's
dry run over the same real directory, and explain every difference. The
rules and the results stay outside the repository.