Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Insert colons after completing nicks preceded by a list of other autocompleted nicks #822
When pinging two people, typing
We only insert the colon after the first autocompleted nick, because if a nick is used in the middle of the sentence it's mentioning the person but not targeting the message at them.
However, this breaks down when we try to ping a list of people. There should be a colon in front of each separating the names from the message. only having a colon at the end of the nick list works too, but it seems like the IRC convention is to just use multiple colons.
This patch makes it so that autocompleting a nick after a list of existing autocompleted nicks at the beginning of the message will include a colon.
nice idea, but I wonder about "should be"
in my opinion
also this probably should take into consideration the completion_char. A popular choice is
finally you should remember that by default irssi only hilights the single-nick case (or, nick in first place). in that regard, the default behaviour is more clear with regards to the expectancy of the receiver
Yeah, however the SIGNAL_FUNC API doesn't work that way because the
I think other clients don't. However, I could make irssi highlight any nick mention in the initial series of colon'd nicks and make this uniform, if that would be acceptable?
Hm, build errors in the last commit because completion_char is a char* instead of char so you can't compare with
This also highlights that completion_char can be a multi character string, so that loop needs more changes than just switching to strcmp. Unless we limit the whole thing to only commas as the completion_char...
I think that was intended as something that keep in mind, not necessarily something to address. It's out of scope of this change anyway. Currently we have two nicks for this,
Yeah, not sure this is the best change of behavior, but there's not a lot that can be done with the way completion works, like manish said. I'd love to have something like a secondary completion char and do "nick1, nick2, nick3:" with subsequent completes editing past chars, but who knows how to get to that in a sane way. On the other hand