Module Name: src
Committed By: christos
Date: Sun Mar 28 13:33:54 UTC 2021
Modified Files:
src/lib/libedit: filecomplete.c
Log Message:
Pass the unescaped filename the the append function so it has to do less work
(for example it can call stat(2) directly (Piotr Stefaniak)
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/lib/libedit/filecomplete.c
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.65 src/lib/libedit/filecomplete.c:1.66
--- src/lib/libedit/filecomplete.c:1.65 Sat Mar 27 14:55:02 2021
+++ src/lib/libedit/filecomplete.c Sun Mar 28 09:33:54 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: filecomplete.c,v 1.65 2021/03/27 18:55:02 christos Exp $ */
+/* $NetBSD: filecomplete.c,v 1.66 2021/03/28 13:33:54 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.65 2021/03/27 18:55:02 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.66 2021/03/28 13:33:54 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -291,7 +291,7 @@ escape_filename(EditLine * el, const cha
if (single_match && app_func) {
escaped_str[offset] = 0;
- append_char = app_func(escaped_str);
+ append_char = app_func(filename);
/* we want to append space only if we are not inside quotes */
if (append_char[0] == ' ') {
if (!s_quoted && !d_quoted)