Repository navigation
fix(send): DM-parse error hints at recovery (closes #147) - #252
Merged
Merged
Conversation
Old error was just 'Usage: airc send @peer <message>' — true but unhelpful for the most common cause (#141): user wanted an in-channel @-mention, not a DM, and got an unhelpful usage line. New error spells out three recovery paths: airc msg @peer <message> DM that peer airc msg @Peer1 @peer2 <message> DM multiple peers airc msg "hi @peer, fyi" in-channel @-mention (quote so @ stays in body) ERROR: got @-targets but no message body. If you wanted an @-mention in the channel, quote the whole message. Verification: tabs 19/0; manual exercise of empty-body case.
There was a problem hiding this comment.
Pull request overview
Updates cmd_send’s empty-message-after-@peer error to provide clearer recovery guidance when users accidentally trigger DM parsing while intending an in-channel @mention (issue #141), closing #147.
Changes:
- Replaces the single-line usage error for “DM targets but empty body” with a multi-line Usage block plus a more descriptive error.
- Adds an example intended to clarify how to do an in-channel
@mentionwithout triggering DM parsing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+135
to
+138
| echo " airc msg @peer <message> DM that peer" >&2 | ||
| echo " airc msg @peer1 @peer2 <message> DM multiple peers" >&2 | ||
| echo " airc msg \"hi @peer, fyi\" in-channel @-mention (quote so @ stays in body)" >&2 | ||
| die "got @-targets but no message body. If you wanted an @-mention in the channel, quote the whole message." |
Comment on lines
+132
to
+133
| # wanting an in-channel @-mention rather than a DM (#141). Two | ||
| # explicit recovery paths instead of just the bare usage line. |
2 of 4 tasks
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.
Empty-body-after-@-target error now lists the three recovery shapes including the in-channel @-mention case (root of #141).