]> xenbits.xensource.com Git - freebsd.git/commitdiff
Readd _el_fn_sh_complete for backward compatibility
authorbapt <bapt@FreeBSD.org>
Wed, 11 Sep 2019 07:03:17 +0000 (07:03 +0000)
committerbapt <bapt@FreeBSD.org>
Wed, 11 Sep 2019 07:03:17 +0000 (07:03 +0000)
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

contrib/libedit/filecomplete.c
contrib/libedit/histedit.h

index 8dd14c7f2d4491a5afa58b003162294dd99ec565..662a0bb85d0b15a21ceb1d769ac07a08f6a77e22 100644 (file)
@@ -823,3 +823,13 @@ _el_fn_complete(EditLine *el, int ch __attribute__((__unused__)))
            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 5b5bad1a021aa402704725dd30187ea6f89d6a15..56bb3ef9ea6aa3f4088c76cfbcb293411f4ddb8b 100644 (file)
@@ -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