Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ksh complete file names including a ~ correctly.
details: https://anonhg.NetBSD.org/src/rev/6d6943703021
branches: trunk
changeset: 537147:6d6943703021
user: provos <provos%NetBSD.org@localhost>
date: Fri Sep 27 13:23:55 2002 +0000
description:
complete file names including a ~ correctly.
diffstat:
bin/ksh/emacs.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 356191ea21f0 -r 6d6943703021 bin/ksh/emacs.c
--- a/bin/ksh/emacs.c Fri Sep 27 12:01:51 2002 +0000
+++ b/bin/ksh/emacs.c Fri Sep 27 13:23:55 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emacs.c,v 1.13 2002/09/25 02:55:03 provos Exp $ */
+/* $NetBSD: emacs.c,v 1.14 2002/09/27 13:23:55 provos Exp $ */
/*
* Emacs-like command line editing and history
@@ -1798,15 +1798,15 @@
olen = end - start;
nlen = x_longest_prefix(nwords, words);
- /* complete single match, or multi-match without globbing chars */
- if ((nlen > olen) &&
- ((nwords == 1) || (strncmp(words[0], xbuf + start, olen) == 0))) {
+ /* complete */
+ if (nlen > olen) {
x_goto(xbuf + start);
x_delete(olen, FALSE);
x_escape(words[0], nlen, x_emacs_putbuf);
x_adjust();
completed = 1;
}
+ /* add space if single non-dir match */
if ((nwords == 1) && (!ISDIRSEP(words[0][nlen - 1]))) {
x_ins(space);
completed = 1;
Home |
Main Index |
Thread Index |
Old Index