Skip to content

hooks.pre-bash

Refuse the Bash commands that succeed while creating a silently broken

state: a footman gate piped into tail/head, and a git push of a branch that conflicts with origin/main.

The pipe guard. A gate's exit code is its verdict, and a pipe replaces it with the filter's — so fm check | tail -4 reports 0 whatever happened, and prints the parallel step summary while the failing step scrolls past above. This session called a red gate green exactly that way.

The push guard. Several agent sessions share this repo, so main moves while a branch is being built — and a branch pushed from a stale base opens a CONFLICTING pull request, for which GitHub cannot build its test-merge and therefore spawns no CI at all: no red X, no checks, just an absence nothing points at (PR #304 sat exactly that way). The guard runs the same test-merge locally (git merge-tree --write-tree) before letting the push through. Tag pushes, deletions and pushes of main itself pass untouched.

Both are deliberately narrow. Command separators split first, so fm check && echo done | tail stays legal; quoted spans are data, so rg "fm check" | head passes. Nudges, not a sandbox: grep destroys a verdict just as well, and --force is still force — widening either guard starts eating ordinary commands.

Hidden: this task is not listed by fm --list, --tree or completion — it runs like any other when named.

fm hooks.pre-bash
Parameter Type Default Description
<event>

Example

$ fm hooks.pre-bash