svn commit: r352204 - head/contrib/libedit

Baptiste Daroussin bapt at FreeBSD.org
Wed Sep 11 07:03:18 UTC 2019


Author: bapt
Date: Wed Sep 11 07:03:17 2019
New Revision: 352204
URL: https://svnweb.freebsd.org/changeset/base/352204

Log:
  Readd _el_fn_sh_complete for backward compatibility
  
  This function is not needed anymore, it allows old sh binary to continue
  to run and avoid breaking backward compatibility.
  Note that is now just calls the regular _el_fn_complete which does a proper
  job at quoting.
  
  Discussed with:	jilles

Modified:
  head/contrib/libedit/filecomplete.c
  head/contrib/libedit/histedit.h

Modified: head/contrib/libedit/filecomplete.c
==============================================================================
--- head/contrib/libedit/filecomplete.c	Wed Sep 11 04:59:27 2019	(r352203)
+++ head/contrib/libedit/filecomplete.c	Wed Sep 11 07:03:17 2019	(r352204)
@@ -823,3 +823,13 @@ _el_fn_complete(EditLine *el, int ch __attribute__((__
 	    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);
+}

Modified: head/contrib/libedit/histedit.h
==============================================================================
--- head/contrib/libedit/histedit.h	Wed Sep 11 04:59:27 2019	(r352203)
+++ head/contrib/libedit/histedit.h	Wed Sep 11 07:03:17 2019	(r352204)
@@ -113,6 +113,7 @@ int		 el_parse(EditLine *, int, const char **);
 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


More information about the svn-src-all mailing list