rtb remove¶
Reverse a previous rtb generate, keeping .rtb/manifest.yaml
consistent. Three kinds, matching the generate verbs one for one:
command, flag, setting.
All three operate on the current directory — unlike parts of
generate, there is no -p, --path option on any remove kind.
Common arguments¶
| Argument | Type | Default | Notes |
|---|---|---|---|
--force |
flag | off | Proceed even when the target file is listed in the manifest's protected: array. |
--dry-run |
flag | off | Print what would happen; write nothing. |
rtb remove command <COMMAND_PATH>¶
Deletes src/commands/<name>.rs, strips its pub mod line from the
// rtb:commands-begin / -end region of src/commands/mod.rs, and
drops the manifest entry.
Fails when the command is not in the manifest's generated: map
("greet is not a scaffolded command"), when the path contains /
(nested paths are not supported), or when the file is protected and
--force was not given. The protected-path error suggests either
--force or running rtb generate command unprotect first.
rtb remove flag <FLAG_NAME>¶
| Argument | Type | Default | Notes |
|---|---|---|---|
FLAG_NAME (positional) |
string | — | Long name without the leading --. |
-c, --command <COMMAND_PATH> |
string | — | Required. The command holding the flag. |
Splices the matching argument out of the target command's marker region.
The protected: guard is checked against the parent command's file,
not the flag.
rtb remove setting <FIELD_NAME>¶
Strips the field — and the // default: comment above it, if any — from
the AppConfig settings marker region in src/main.rs, then re-hashes
the manifest.
Because the target is src/main.rs, --force here overrides a
protected: src/main.rs entry rather than a per-command one. Removing a
setting that is not present is an error, not a no-op:
"setting greeting not found".
Related¶
rtb generate— the forward direction..rtb/manifest.yaml— whereprotected:lives.