diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sftp.c | 9 |
2 files changed, 7 insertions, 6 deletions
@@ -26,6 +26,10 @@ | |||
26 | [servconf.c servconf.h sshd.c] | 26 | [servconf.c servconf.h sshd.c] |
27 | avoid run-time failures when specifying hostkeys via a relative | 27 | avoid run-time failures when specifying hostkeys via a relative |
28 | path by prepending the cwd in these cases; bz#1290; ok dtucker@ | 28 | path by prepending the cwd in these cases; bz#1290; ok dtucker@ |
29 | - djm@cvs.openbsd.org 2010/01/13 04:10:50 | ||
30 | [sftp.c] | ||
31 | don't append a space after inserting a completion of a directory (i.e. | ||
32 | a path ending in '/') for a slightly better user experience; ok dtucker@ | ||
29 | 33 | ||
30 | 20100112 | 34 | 20100112 |
31 | - (dtucker) OpenBSD CVS Sync | 35 | - (dtucker) OpenBSD CVS Sync |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.119 2010/01/13 01:40:16 djm Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.120 2010/01/13 04:10:50 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -1760,15 +1760,12 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path, | |||
1760 | } | 1760 | } |
1761 | 1761 | ||
1762 | lf = el_line(el); | 1762 | lf = el_line(el); |
1763 | /* | ||
1764 | * XXX should we really extend here? the user may not be done if | ||
1765 | * the filename is a directory. | ||
1766 | */ | ||
1767 | if (g.gl_matchc == 1) { | 1763 | if (g.gl_matchc == 1) { |
1768 | i = 0; | 1764 | i = 0; |
1769 | if (!terminated) | 1765 | if (!terminated) |
1770 | ins[i++] = quote; | 1766 | ins[i++] = quote; |
1771 | if (lastarg || *(lf->cursor) != ' ') | 1767 | if (*(lf->cursor - 1) != '/' && |
1768 | (lastarg || *(lf->cursor) != ' ')) | ||
1772 | ins[i++] = ' '; | 1769 | ins[i++] = ' '; |
1773 | ins[i] = '\0'; | 1770 | ins[i] = '\0'; |
1774 | if (i > 0 && el_insertstr(el, ins) == -1) | 1771 | if (i > 0 && el_insertstr(el, ins) == -1) |