mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-28 16:24:39 +02:00
- djm@cvs.openbsd.org 2010/01/13 04:10:50
[sftp.c] don't append a space after inserting a completion of a directory (i.e. a path ending in '/') for a slightly better user experience; ok dtucker@
This commit is contained in:
parent
88b6fb2b55
commit
9c3ba07f60
@ -26,6 +26,10 @@
|
|||||||
[servconf.c servconf.h sshd.c]
|
[servconf.c servconf.h sshd.c]
|
||||||
avoid run-time failures when specifying hostkeys via a relative
|
avoid run-time failures when specifying hostkeys via a relative
|
||||||
path by prepending the cwd in these cases; bz#1290; ok dtucker@
|
path by prepending the cwd in these cases; bz#1290; ok dtucker@
|
||||||
|
- djm@cvs.openbsd.org 2010/01/13 04:10:50
|
||||||
|
[sftp.c]
|
||||||
|
don't append a space after inserting a completion of a directory (i.e.
|
||||||
|
a path ending in '/') for a slightly better user experience; ok dtucker@
|
||||||
|
|
||||||
20100112
|
20100112
|
||||||
- (dtucker) OpenBSD CVS Sync
|
- (dtucker) OpenBSD CVS Sync
|
||||||
|
9
sftp.c
9
sftp.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sftp.c,v 1.119 2010/01/13 01:40:16 djm Exp $ */
|
/* $OpenBSD: sftp.c,v 1.120 2010/01/13 04:10:50 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -1760,15 +1760,12 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
lf = el_line(el);
|
lf = el_line(el);
|
||||||
/*
|
|
||||||
* XXX should we really extend here? the user may not be done if
|
|
||||||
* the filename is a directory.
|
|
||||||
*/
|
|
||||||
if (g.gl_matchc == 1) {
|
if (g.gl_matchc == 1) {
|
||||||
i = 0;
|
i = 0;
|
||||||
if (!terminated)
|
if (!terminated)
|
||||||
ins[i++] = quote;
|
ins[i++] = quote;
|
||||||
if (lastarg || *(lf->cursor) != ' ')
|
if (*(lf->cursor - 1) != '/' &&
|
||||||
|
(lastarg || *(lf->cursor) != ' '))
|
||||||
ins[i++] = ' ';
|
ins[i++] = ' ';
|
||||||
ins[i] = '\0';
|
ins[i] = '\0';
|
||||||
if (i > 0 && el_insertstr(el, ins) == -1)
|
if (i > 0 && el_insertstr(el, ins) == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user