new bindable readline command `execute-named-command', bound to M-x in emacs mode

This commit is contained in:
Chet Ramey
2023-11-06 09:44:01 -05:00
parent b30389070a
commit 511fef0f5c
10 changed files with 497 additions and 7 deletions
+3 -1
View File
@@ -159,7 +159,9 @@ STREQ(const char *a, const char *b)
static inline int
STREQN(const char *a, const char *b, size_t n)
{
return ((n == 0) || ((a)[0] == (b)[0] && strncmp(a, b, n) == 0));
return ((n == 0) ||
(n == 1 && a[0] == b[0]) ||
((a)[0] == (b)[0] && strncmp(a, b, n) == 0));
}
/* More convenience definitions that possibly save system or libc calls. */