Module Name:    src
Committed By:   christos
Date:           Fri Feb  3 22:01:43 UTC 2023

Modified Files:
        src/lib/libedit: filecomplete.c histedit.h

Log Message:
Add a entry point for the complete function for FreeBSD compatibility with sh.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/lib/libedit/filecomplete.c
cvs rdiff -u -r1.61 -r1.62 src/lib/libedit/histedit.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libedit/filecomplete.c
diff -u src/lib/libedit/filecomplete.c:1.71 src/lib/libedit/filecomplete.c:1.72
--- src/lib/libedit/filecomplete.c:1.71	Sun Oct 30 15:11:31 2022
+++ src/lib/libedit/filecomplete.c	Fri Feb  3 17:01:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: filecomplete.c,v 1.71 2022/10/30 19:11:31 christos Exp $	*/
+/*	$NetBSD: filecomplete.c,v 1.72 2023/02/03 22:01:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: filecomplete.c,v 1.71 2022/10/30 19:11:31 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.72 2023/02/03 22:01:42 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -851,3 +851,13 @@ _el_fn_complete(EditLine *el, int ch __a
 	    break_chars, NULL, NULL, (size_t)100,
 	    NULL, NULL, NULL, NULL);
 }
+
+/*
+ * el-compatible wrapper around rl_complete; needed for key binding
+ */
+/* ARGSUSED */
+unsigned char
+_el_fn_sh_complete(EditLine *el, int ch)
+{
+	return _el_fn_complete(el, ch);
+}

Index: src/lib/libedit/histedit.h
diff -u src/lib/libedit/histedit.h:1.61 src/lib/libedit/histedit.h:1.62
--- src/lib/libedit/histedit.h:1.61	Tue Feb  8 16:13:22 2022
+++ src/lib/libedit/histedit.h	Fri Feb  3 17:01:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: histedit.h,v 1.61 2022/02/08 21:13:22 rillig Exp $	*/
+/*	$NetBSD: histedit.h,v 1.62 2023/02/03 22:01:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -113,6 +113,7 @@ int		 el_parse(EditLine *, int, const ch
 int		 el_set(EditLine *, int, ...);
 int		 el_get(EditLine *, int, ...);
 unsigned char	_el_fn_complete(EditLine *, int);
+unsigned char	_el_fn_sh_complete(EditLine *, int);
 
 /*
  * el_set/el_get parameters

Reply via email to