Skip to content
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

Implement substring autocompletion for /msg #1985

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jubalh
Copy link
Member

@jubalh jubalh commented Jun 20, 2024

People with huge contact lists most likely happen to have contacts starting with popular names more often. They can use /msg Arthur to find the correct person.

But if they have 50 Arthurs it will take a while. Using the surname might be faster. So a substring search of /msg Clarke will be faster.

Fix #1984

People with huge contact lists most likely happen to have contacts starting with popular names more often.
They can use /msg Arthur to find the correct person.

But if they have 50 Arthurs it will take a while. Using the surname might be faster. So a substring search of /msg Clarke<tab> will be faster.

Fix #1984
@jubalh
Copy link
Member Author

jubalh commented Jun 24, 2024

roster_contact_autocomplete() is used for:

  • /msg
  • /info
  • /roster remvoe
  • /roster group add
  • /roster group remove
  • /otr policy
  • /pgp start
  • /pgp sendpub
  • /ox start
  • /omemo start
  • /omemo fingerprint
  • /omemo trust
  • /omemo untrust
  • /win
  • /invite send
  • /status get
  • /vcard get
  • /vcard photo open
  • /vcard photo save

@mdosch @weiss @sjaeckel
What are your opinions? Should we generally make roster_contact_autocomplete() autocomplete substrings? Or should we do it as proposed in this PR. That we have two functions, one for the exact prefix and the other for substring.
If we do the latter, do we want it for more functions than /msg?

@jubalh jubalh marked this pull request as ready for review June 24, 2024 08:19
@mdosch
Copy link
Contributor

mdosch commented Jun 26, 2024

If you have a lot of Arthurs the issue of having to tab a lot till you find the right Arthur can happen with any command, so I think we should allow the substring search everywhere. But for the ordering I'd like to rank hits starting with the search term higher.

E.g. if you have "Arthur Anchor", Arthur Boyle", "Arthur Clarke", "Arthur Dent" and "Clark Kent" /msg Clark<tab> should show "Clark Kent" first and then "Arthur Clarke".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable substring autocompletion for /msg
2 participants