summaryrefslogtreecommitdiff
path: root/lib/libedit/eln.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2014-06-18 18:12:28 +0000
committerchristos <christos@NetBSD.org>2014-06-18 18:12:28 +0000
commit4d25614bbe49402011fd1ce72ed3891902f25eef (patch)
treefd60df0675f2262678e75e06f40f6b47ce358d3d /lib/libedit/eln.c
parent0817d1f00e9db3796857350532c57f25cafc9804 (diff)
Don't depend on weak aliases to define the vi "alias" expansion function,
provide an API instead to set it.
Diffstat (limited to 'lib/libedit/eln.c')
-rw-r--r--lib/libedit/eln.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libedit/eln.c b/lib/libedit/eln.c
index cfb1fe5bf37..5bcfb4f2b3b 100644
--- a/lib/libedit/eln.c
+++ b/lib/libedit/eln.c
@@ -1,4 +1,4 @@
-/* $NetBSD: eln.c,v 1.16 2014/05/20 15:05:08 christos Exp $ */
+/* $NetBSD: eln.c,v 1.17 2014/06/18 18:12:28 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: eln.c,v 1.16 2014/05/20 15:05:08 christos Exp $");
+__RCSID("$NetBSD: eln.c,v 1.17 2014/06/18 18:12:28 christos Exp $");
#endif /* not lint && not SCCSID */
#include "histedit.h"
@@ -125,6 +125,13 @@ el_set(EditLine *el, int op, ...)
break;
}
+ case EL_ALIAS_TEXT: {
+ el_afunc_t p = va_arg(ap, el_afunc_t);
+ void *arg = va_arg(ap, void *);
+ ret = ch_aliasfun(el, p, arg);
+ break;
+ }
+
case EL_PROMPT_ESC:
case EL_RPROMPT_ESC: {
el_pfunc_t p = va_arg(ap, el_pfunc_t);