OILS / build / detect-readline-completion-display-matches-hook.c View on Github | oils.pub

20 lines, 7 significant
1/* clang-format off */
2#include <stdio.h>
3#include <readline/readline.h>
4#include <readline/history.h>
5/* clang-format on */
6
7// The hook type does not match readline in older libedit. And it's still just a
8// stub, as of 2026-01:
9//
10// VFunction *rl_completion_display_matches_hook
11//
12// https://github.com/NetBSD/src/commit/ef8fd1897c9f08be13bcdc3486d963f1d27dfa7d
13
14void test_hook(char** matches, int num_matches, int max_length) {
15 return 0;
16}
17
18int main(void) {
19 rl_completion_display_matches_hook = test_hook;
20}