Expand description
§utils.rs - Utility functions for rgrc
This module contains various utility functions used throughout the rgrc application.
Constants§
- PSEUDO_
NO_ COLOR - Pseudo-commands (exact match) that should NOT be colorized for explicit checks
(e.g.
rgrc lsshould not colorize butrgrc ls -lshould). - SUPPORTED_
COMMANDS - Curated list of commands that ship with colorization rules.
Functions§
- command_
exists - Simple command existence check without external dependencies
Check whether an executable named
cmdexists on the user’sPATH. - pseudo_
command_ excluded - Check whether an exact pseudo_command should be excluded from colorization.
- should_
use_ colorization_ for_ command_ supported - Check if a command has colorization rules available (used for Always strategy)
Return
truewhen a command has shipped colorization rules (present inSUPPORTED_COMMANDS). This is a simple membership check used by the Always colorization strategy.