Expand description
Utilities for reading from stdin in pipe-friendly commands.
Supports the - convention: --description - reads from stdin.
Also supports reading bean IDs from stdin, one per line.
Functions§
- read_
ids_ from_ stdin - Read bean IDs from stdin, one per line. Trims whitespace and skips empty lines.
- read_
stdin - Read all of stdin into a string. Returns an error if stdin is a terminal (not piped).
- resolve_
stdin_ opt - Resolve an
Option<String>that might contain “-”. - resolve_
stdin_ value - Resolve a value that might be “-” (meaning read from stdin). If the value is “-”, reads stdin. Otherwise returns the value as-is.