Skip to content

Ignore shell results from previous prompts - #102

Draft
echo8134 wants to merge 1 commit into
cheatmd-dev:mainfrom
echo8134:fix/stale-shell-results
Draft

echo8134 wants to merge 1 commit into
cheatmd-dev:mainfrom
echo8134:fix/stale-shell-results

Conversation

@echo8134

Copy link
Copy Markdown
Contributor

Summary

A delayed shell result could overwrite another prompt or a later visit to the same variable. Tag each request with a generation and accept only results from the current request.

Related issues

No linked issue.

Verification

Four regression cases cover stale options and errors, with controls for current results. A focused race check and a real terminal interaction with a delayed shell result also pass.

Local checks passed on Go 1.27.1. The CI workflow uses Go 1.26.3.

Checklist

  • go build ./... and go test ./... pass
  • gofmt -l . and go vet ./... are clean
  • Added regression tests for the changed behavior
  • cheatmd --lint examples/ passes
  • Docs/wiki changes are not needed for this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant