MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / first_verb

Function first_verb

atomic-cli/src/commands/vault/removed.rs:75–80  ·  view source on GitHub ↗

First non-flag token an agent typed after the removed command (its old verb, e.g. `create`), used to tailor the `run:` redirect. Empty if none.

(args: &[String])

Source from the content-addressed store, hash-verified

73/// First non-flag token an agent typed after the removed command (its old
74/// verb, e.g. `create`), used to tailor the `run:` redirect. Empty if none.
75fn first_verb(args: &[String]) -> &str {
76 args.iter()
77 .map(String::as_str)
78 .find(|a| !a.starts_with('-'))
79 .unwrap_or("")
80}
81
82/// Emit the machine-parseable redirect to stderr and exit non-zero (2).
83///

Callers 1

runMethod · 0.85

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected