-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] username completion with @ #645
Comments
modified src/buffer/input_view/completion.rs
@@ -600,13 +600,17 @@ impl Text {
}
fn process_users(&mut self, input: &str, users: &[User]) {
- let (_, rest) = input.rsplit_once(' ').unwrap_or(("", input));
+ let (_, mut rest) = input.rsplit_once(' ').unwrap_or(("", input));
if rest.is_empty() {
*self = Self::default();
return;
}
+ if let Some((_, last)) = rest.split_once('@') {
+ rest = last;
+ }
+
let nick = rest.to_lowercase();
self.selected = None; This is about as far as I was able to get with it with my limited Rust skills, but tab completing with |
I am not a fan of this, as it is not very irc idiomatic to highlight users with a |
there's not really a "standard" way to highlight on IRC and im pretty sure i've seen clients highlight with |
The default has been just typing a nick and hitting tab in all the IRC clients I've used. I'm not a super big fan of this though, mostly because of confusion with IRC statuses like op @, half op, % voice + and so on. I can see a middle ground where typing @ is turned into a feature that pops up a small type-ahead menu that narrows down users in the channel as more text is typed. But no @ actually sent to the channel :p |
i've already seen the client color usernames preceded with @ before so there's that going for it already
not a bad idea but it may conflict with channel completion with # which i think it might be doing already? |
i think hexchat did the space thing too which effectively let you complete with @, need to remember how it works though for sure |
Probably because any single word that matches a nick in the channel is colored. It's a good point though - highlight coloring should ignore special characters too.
I'm convinced that someone is able to code around all that :) |
This shouldn't be the default, but I've made it configurable in my clients. The reason that convinced me to make it configurable was that some people were using the client to connect to a non-IRC service via an IRC bridge and the convention on that service was different from IRC. In my case I made it configurable what prefix and suffix was added to a nickname both at the start and separately in the middle of a message. When completing at the start people often like a trailing comma or colon, for example. @voidlily If you're putting @'s in front of people's nicknames on a normal IRC server you're just going to annoy a lot of people, though. |
i think configurable would make sense, i'm working on bridges as well and the convention for the services i'm bridging to also have the @-mention convention if people feel strongly enough about it that having @ completion would annoy people on "real" irc anyway |
I'd like to be able to complete usernames with @ because that's a pretty common thing on a lot of other forms of communication. For example, typing
@userna<tab>
would complete to something like@username:
, preserving the @ sign.I tried to implement this myself but my Rust skills are not very good so I wasn't able to get very far with it.
The text was updated successfully, but these errors were encountered: