Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Only unescape when we are quoting and don't add ...
details: https://anonhg.NetBSD.org/src/rev/019a1b024208
branches: trunk
changeset: 960762:019a1b024208
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 28 13:39:39 2021 +0000
description:
Only unescape when we are quoting and don't add a space if we are quoting
(we already did) (Piotr Stefaniak)
diffstat:
lib/libedit/filecomplete.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r cdc55f58d7b4 -r 019a1b024208 lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c Sun Mar 28 13:38:10 2021 +0000
+++ b/lib/libedit/filecomplete.c Sun Mar 28 13:39:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filecomplete.c,v 1.66 2021/03/28 13:33:54 christos Exp $ */
+/* $NetBSD: filecomplete.c,v 1.67 2021/03/28 13:39:39 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.66 2021/03/28 13:33:54 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.67 2021/03/28 13:39:39 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -667,7 +667,7 @@
size_t len;
int what_to_do = '\t';
int retval = CC_NORM;
- int do_unescape = attempted_completion_function == NULL? 1: 0;
+ int do_unescape = flags & FN_QUOTE_MATCH;
if (el->el_state.lastcmd == el->el_state.thiscmd)
what_to_do = '?';
@@ -736,7 +736,9 @@
el_winsertstr(el,
ct_decode_string(completion, &el->el_scratch));
- if (single_match && attempted_completion_function) {
+ if (single_match && attempted_completion_function &&
+ !(flags & FN_QUOTE_MATCH))
+ {
/*
* We found an exact match. Add a space after
* it, unless we do filename completion and the
Home |
Main Index |
Thread Index |
Old Index