Expand description
Just enough POSIX shell parsing for the PreToolUse rewrite to decide
whether a command can run as { cmd; } | sqz compress.
A pipeline element runs in a subshell, so a builtin that changes shell
state (cd, export, source, set, …) stops affecting the session once
the command is grouped, and a background job keeps the pipe open until
it exits. plan refuses those and anything it can’t follow, and
accepts the rest: pipes, &&/||/; lists, loops, redirects,
heredocs and comments. A leading cd DIR && stays outside the group.
Structs§
Enums§
Functions§
- basename
- A command’s name with its directory and any
.exesuffix removed. - flat
- Split
commandinto simple commands joined by&&,||,;or newlines, marking the ones whose output can go through sqz on their own. Nothing is grouped, so builtins keep running in the shell itself and a permission checker sees the user’s commands as written. - flat_
for flat, unless piping its commands could run one the original never runs inshell.- plan
- Decide whether, and how,
commandcan be piped through sqz.