Skip to main content

is_argument_data

Function is_argument_data 

Source
pub fn is_argument_data(command: &str, preceding_flag: Option<&str>) -> bool
Expand description

Check if a command’s argument at a given position should be treated as data.

This is a convenience function that uses the default registry to determine if an argument is purely data (not executed by the shell).

§Arguments

  • command - The full command string
  • preceding_flag - The flag (e.g., -m, --message) that owns the argument under consideration, if any

§Returns

true if the argument at that position is known to be data-only.