Skip to main content

Module cli

Module cli 

Source
Expand description

CLI and environment parsing helpers.

This module provides utilities for parsing environment variables and CLI inputs in consistent ways.

Structs§

Argv
Parsed editor command with program and arguments.

Functions§

bool_from_env
Read a boolean from an environment variable.
editor_argv
Get the editor command from $VISUAL or $EDITOR, parsed into program and args.
parse_comma_set
Parse a comma/whitespace separated string into a lowercase-trimmed set.
set_from_env
Return Option<BTreeSet> if the environment variable is present and non-empty.
usize_from_env
Read a usize from an environment variable.