Summary
basecamp comment appears to preserve a leading $ when multiline content is passed with shell ANSI-C quoting ($'...'). The posted Basecamp comment starts with a literal $, even though the expected content starts with the first character inside the quoted string.
This is easy to hit from agent/shell workflows when posting multiline comments with attachments.
Observed
Command shape used from bash:
basecamp comment 9802493119 $'海报 mockup 方向稿:\n\n<bc-attachment ...></bc-attachment>' --in 17525144 --json
The command succeeded, but the created comment content began with a literal $:
$海报 mockup 方向稿:\n\n<bc-attachment ...>...</bc-attachment>
The attachment uploaded and rendered correctly; only the leading $ was unexpected.
Expected
The comment body should begin with:
not:
Notes
This may be a shell/argument parsing edge case rather than Basecamp API behavior, but from the CLI user perspective it is surprising because the help documents:
basecamp comment <id|url> <content> [flags]
and multiline content/Markdown is a common use case for comments.
Potential fixes or mitigations:
- Add explicit support for
--content-file / stdin content for basecamp comment, so agents can avoid fragile shell quoting for multiline rich text.
- Document the recommended safe multiline pattern (temp file/stdin/here-doc) and warn against
$'...' if unsupported.
- If the CLI currently receives literal
$'...' from some execution contexts, strip only the ANSI-C quote wrapper safely before posting.
Environment
- basecamp CLI:
0.7.2
- Command:
basecamp comment
- Context: Linux sandbox shell invoked by an agent workflow
Summary
basecamp commentappears to preserve a leading$when multiline content is passed with shell ANSI-C quoting ($'...'). The posted Basecamp comment starts with a literal$, even though the expected content starts with the first character inside the quoted string.This is easy to hit from agent/shell workflows when posting multiline comments with attachments.
Observed
Command shape used from bash:
basecamp comment 9802493119 $'海报 mockup 方向稿:\n\n<bc-attachment ...></bc-attachment>' --in 17525144 --jsonThe command succeeded, but the created comment content began with a literal
$:The attachment uploaded and rendered correctly; only the leading
$was unexpected.Expected
The comment body should begin with:
not:
Notes
This may be a shell/argument parsing edge case rather than Basecamp API behavior, but from the CLI user perspective it is surprising because the help documents:
and multiline content/Markdown is a common use case for comments.
Potential fixes or mitigations:
--content-file/ stdin content forbasecamp comment, so agents can avoid fragile shell quoting for multiline rich text.$'...'if unsupported.$'...'from some execution contexts, strip only the ANSI-C quote wrapper safely before posting.Environment
0.7.2basecamp comment