Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2019 07:03:17 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352204 - head/contrib/libedit
Message-ID:  <201909110703.x8B73HwC039167@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909110703.x8B73HwC039167>