Add stdin support for comment content
Merged
RO
4mo ago+183+183+012345678901234567890123456789-0-0-0123456789
Summary
This adds support for supplying comment content via piped stdin for basecamp comment and basecamp comments create.
That makes the CLI easier to use in scripts and shell pipelines, especially for multiline Markdown or generated text, without requiring awkward shell quoting.
Closes #410
Changes
- Read comment content from stdin when positional content is omitted
- Preserve existing behavior when positional content is provided
- Keep
--editbehavior unchanged - Add tests covering stdin input for both
commentandcomments create
Live verification
Tested against the Rob Zolkos account in the Verdant Coffee Roasters project,
Fusilli todolist, using a locally built rebased branch.
printf ... | basecamp comment <todo_id>created a comment with the piped content.printf ... | basecamp comments create <todo_id>created a comment with the piped content.printf ignored | basecamp comment <todo_id> "positional content"used the positional content and ignored stdin.
Summary by cubic
Adds stdin support for comment content in basecamp comment and basecamp comments create when no positional content is provided, and returns a clear usage error early when content is empty (Linear 410). This simplifies scripts and avoids unnecessary account lookups.
- New Features
- Read comment content from piped stdin when content is omitted; help now shows a piping example.
- Positional content takes precedence over stdin.
- Return " required" before account resolution when no content or stdin is provided.
--editbehavior unchanged.