{"id":20874667,"url":"https://github.com/neomutt/completion-api","last_synced_at":"2026-06-28T22:31:33.871Z","repository":{"id":72106817,"uuid":"229575257","full_name":"neomutt/completion-api","owner":"neomutt","description":"A new touch to the completion system of neomutt","archived":false,"fork":false,"pushed_at":"2023-08-30T14:31:23.000Z","size":154,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-08T09:29:35.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neomutt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"flatcap","patreon":"neomutt","liberapay":"flatcap","custom":"paypal.me/russon"}},"created_at":"2019-12-22T13:52:59.000Z","updated_at":"2023-07-19T07:03:13.000Z","dependencies_parsed_at":"2024-11-18T09:30:33.610Z","dependency_job_id":null,"html_url":"https://github.com/neomutt/completion-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neomutt/completion-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomutt%2Fcompletion-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomutt%2Fcompletion-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomutt%2Fcompletion-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomutt%2Fcompletion-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neomutt","download_url":"https://codeload.github.com/neomutt/completion-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neomutt%2Fcompletion-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34906700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T06:35:38.372Z","updated_at":"2026-06-28T22:31:33.855Z","avatar_url":"https://github.com/neomutt.png","language":"C","funding_links":["https://github.com/sponsors/flatcap","https://patreon.com/neomutt","https://liberapay.com/flatcap","paypal.me/russon"],"categories":[],"sub_categories":[],"readme":"# Specific todos\n\n## completion.c\n\n  - what is NNTP, and how to include it? (l75)\n  - IMAP completion (l80)\n\n# Auto-Completion API\n\nEncapsulate all the completion code to make it easier to test and maintain.\nCurrently, this code is scattered throughout NeoMutt and often uses global\nvariables.  It needs to be separated and tidied up.\n\n- [x] Create an Auto-Completion library -- separate the code from the rest of NeoMutt\n- [x] Create an API (list of functions) that everyone uses\n\nThis library should be only be dependent on libmutt.\n\nThe auto-completion code is given:\n- a list of possible symbols to match\n- what the user has typed so far\n\nIt replies by:\n- [x] doing nothing (no matches)\n- [x] completing the symbols (one match found)\n- [ ] returning the list of matching symbols\n- [ ] The user can either \u003ckbd\u003eTab\u003c/kbd\u003e through them or select from a menu\n\n## Fuzzy completion/API\n\n- [x] consider swapping of characters on top of deletion/insertion/substitution (damerau-levenshtein)\n\n# Flatcaps braindump\n\n*Method*: create, populate, query, destroy\n\n## query flags\n\n  - [X] ignore case\n  - [x] fuzzy\n  - [x] regex (~=fuzzy?)\n  - [ ] magic (dash==underscore)\n  - [ ] partial\n\n## completion priority\n\n  - [x] prioritise completion *over* flags (run flag consistent first, then with less restrictions)\n    - I think it is better to not complete if there are no matches with the current flags\n    - it would be confusing to the user, when \"flatcap@\" suddenly turns into \"FLATCAP@\" even though they enabled the case-insensitive search...\n    - in case of fuzzy matching, it will still find the other matches (but they will be found at the bottom of the match list)\n    - in case of exact matching, we would not want any other match to invade our search (unexpected behaviour)\n    - just by toggling the \"showall\" flag, even the non-matches will be available, so widening the search is possible\n\n## client settings\n\n  - [x] option to match first, or cycle\n  - [ ] match longest\n\n## Requirements:\n\n  - [x] self-contained, except for libmutt\n  - [ ] tests in test-library repo branch\n\n## coding\n\n  - [ ] pass list[] { flags, string }\n  - [ ] need work buffer (matching length of longest string)\n  - [ ] need cursor position\n  - [ ] string data passed in is const\n  - [ ] highlighting of matches for fuzzy/partial\n  - [ ] flag partial: (anywhere in string); anchor: start, none, end\n  - [ ] sort variables, etc before auto-completion or properly sort the sources of the strings\n\n## multi-field matching?\n  e.g. Index\n  pass [] { flags, str1, str2, etc }\n  flags control which are matched?  flags ∀ strings?\n  C.add_column(flags, [], num)\n    have [] of flags for matches\n    doesn't add data, just flags behaviour\n  C.add_row() probably better\n    for data\n\n  need set of matcher callback functions\n    pass flags, row\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneomutt%2Fcompletion-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneomutt%2Fcompletion-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneomutt%2Fcompletion-api/lists"}