feat: pass --quiet and --no-color flags through ez watch#1606
Merged
SchoolyB merged 1 commit intoSchoolyB:devfrom May 4, 2026
Merged
feat: pass --quiet and --no-color flags through ez watch#1606SchoolyB merged 1 commit intoSchoolyB:devfrom
SchoolyB merged 1 commit intoSchoolyB:devfrom
Conversation
Adds --quiet/-q and --no-color flag support to ez watch, mirroring the pattern already used by ez build and ez check (cmd/ez/commands.go:440-450). In runWatch, build a compilerArgs slice from cmd.Flags() and plumb it through watchFile, watchDirectory, and executeFile so each compiler invocation on file changes receives the same flags. Closes SchoolyB#1573
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ez watchre-runs the compiler on file changes but didn't accept--quietor--no-color, unlikeez buildandez check. This PR adds both flags towatchCmdand passes them through to eachezc.Runinvocation, mirroring the existing pattern inbuildCmd.What changed
cmd/ez/commands.go— register--quiet/-q(string) and--no-color(bool) onwatchCmd(mirror of the existingbuildCmd/checkCmdregistrations a few lines above).cmd/ez/watch.go— inrunWatch, build acompilerArgs []stringfromcmd.Flags()using the sameif quiet == "all"/else if quiet != ""/noColorshape asbuildCmd(commands.go:440-450). Plumb the slice throughwatchFile,watchDirectory, andexecuteFileso each rerun callsezc.Run(filename, compilerArgs)instead ofezc.Run(filename, nil).23 lines added, 10 removed across two files.
Verification
go build ./...andgo vet ./...pass.make test— 907/907 passing.ezcconfirms the slice reaches the compiler:ez watch foo.ez --no-color→run foo.ez --no-colorez watch foo.ez -q W1001→run foo.ez --quiet W1001ez watch foo.ez -q all→run foo.ez --quietez watch foo.ez→run foo.ez(nil args, unchanged behavior)Closes #1573
This contribution was developed with AI assistance.