Skip to main content

Module config

Module config 

Source
Expand description

User TOML configuration for f00.

Search order (first found wins):

  1. --config PATH if provided
  2. $F00_CONFIG if set
  3. Platform config dir:
    • Unix: $XDG_CONFIG_HOME/f00/config.toml or ~/.config/f00/config.toml (macOS via directories: ~/Library/Application Support/f00/config.toml)
    • Windows: %APPDATA%\f00\config.toml

Structs§

ConfigDefaults
Optional defaults from a TOML config file.
FileConfig
Root of config.toml. Fields may live under [defaults] or at the root.

Functions§

apply_env_overrides
Apply env overrides (F00_GNU).
cli_has_long
Whether flag (e.g. --icons or --git) appears in process args.
config_search_paths
Paths to try when no --config override is given.
invoked_as_ls
Detect whether the binary was invoked as ls / ls.exe.
invoked_as_ls_from
Testable argv0 check.
load_config_from_path
Load config from an explicit path.
load_user_config
Load config: explicit path, else first existing search path, else None.
merge_config_into_args
Merge file defaults into CLI args.
parse_config_str
Parse TOML text into a FileConfig.
platform_config_path
Resolve the platform user config path (…/f00/config.toml), if available.
resolve_args
Resolve effective args after clap parse.