Expand description
§use-command-name
Command and executable name primitives for RustUse CLI-adjacent code.
This crate validates command names and extracts executable names from paths. It does not implement command routing, subcommands, aliases, or dispatch.
§Example
use use_command_name::{CommandName, ExecutableName};
let command = CommandName::new("rustuse")?;
let executable = ExecutableName::new("rustuse.exe")?;
assert_eq!(command.as_str(), "rustuse");
assert_eq!(executable.display_name(), "rustuse.exe");§Scope
Use this crate for explicit command name vocabulary, not parser or runtime behavior.
Modules§
- prelude
- Commonly used command name primitives.
Structs§
- Command
Name - A validated command name.
- Executable
Name - A validated executable or binary name.
Enums§
- Command
Name Error - Validation errors for command and executable names.
Functions§
- executable_
name_ from_ path - Extracts a validated executable name from a path.
- is_
valid_ command_ name - Returns whether
nameis valid for this crate’s command name primitive.