docs(fermata): the page names the spaced exclude flag a rule still stops
This commit is contained in:
@@ -91,7 +91,7 @@ The guard stops a Write or Edit that adds a mask to a file. It does not cover th
|
|||||||
- A verb given by a path counts as no metadata verb: `/bin/ls .env`.
|
- A verb given by a path counts as no metadata verb: `/bin/ls .env`.
|
||||||
- `git` with any flag before its command other than `--no-pager`, `-P`, `--no-optional-locks` and `-C`: `git -c core.pager=x status .env`.
|
- `git` with any flag before its command other than `--no-pager`, `-P`, `--no-optional-locks` and `-C`: `git -c core.pager=x status .env`.
|
||||||
- A word with a separator and `$`, `*` or `?` may be a path once the shell expands it: `git log vendor/$BRANCH`, `curl example.invalid/vendor/$ID`, `composer require vendor/*` under a rule on `vendor/`.
|
- A word with a separator and `$`, `*` or `?` may be a path once the shell expands it: `git log vendor/$BRANCH`, `curl example.invalid/vendor/$ID`, `composer require vendor/*` under a rule on `vendor/`.
|
||||||
- The text after `=` in a flag off the short exclude list: `tool --name=.env`.
|
- The text after `=` in a flag off the short exclude list: `tool --name=.env`. The spaced form of an exclude flag counts only for `grep`, `tar` and `rsync`: `git log --grep .env`.
|
||||||
- A value flag of a tool other than `grep` and `rg`, or one off their list: `grep --color always .env a.txt` takes `always` as the pattern.
|
- A value flag of a tool other than `grep` and `rg`, or one off their list: `grep --color always .env a.txt` takes `always` as the pattern.
|
||||||
|
|
||||||
(Test for all five: `a_harmless_command_a_rule_still_stops`.)
|
(Test for all five: `a_harmless_command_a_rule_still_stops`.)
|
||||||
|
|||||||
@@ -496,6 +496,7 @@ fn a_harmless_command_a_rule_still_stops() {
|
|||||||
"curl example.invalid/vendor/$ID",
|
"curl example.invalid/vendor/$ID",
|
||||||
"composer require vendor/*",
|
"composer require vendor/*",
|
||||||
"tool --name=.env",
|
"tool --name=.env",
|
||||||
|
"git log --grep .env",
|
||||||
"grep --color always .env a.txt",
|
"grep --color always .env a.txt",
|
||||||
] {
|
] {
|
||||||
assert!(denied(&p.bash(command)), "{command}");
|
assert!(denied(&p.bash(command)), "{command}");
|
||||||
|
|||||||
Reference in New Issue
Block a user