From d78739ab90f6561d7fef5a7de495644868e01a24 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 24 Oct 2010 10:56:32 +1100 Subject: [PATCH] - sthen@cvs.openbsd.org 2010/10/23 22:06:12 [sftp.c] escape '[' in filename tab-completion; fix a type while there. ok djm@ --- ChangeLog | 5 +++++ sftp.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2843d9463..13f619a60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 20101024 - (dtucker) [includes.h] Add missing ifdef GLOB_HAS_GL_STATV to fix build. + - (dtucker) OpenBSD CVS Sync + - sthen@cvs.openbsd.org 2010/10/23 22:06:12 + [sftp.c] + escape '[' in filename tab-completion; fix a type while there. + ok djm@ 20101021 - OpenBSD CVS Sync diff --git a/sftp.c b/sftp.c index 1421fcb02..d605505ea 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.130 2010/10/05 05:13:18 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.131 2010/10/23 22:06:12 sthen Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -1725,6 +1725,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path, case '"': case '\\': case '\t': + case '[': case ' ': if (quote == '\0' || tmp2[i] == quote) { if (el_insertstr(el, ins) == -1) @@ -1854,7 +1855,7 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2) /* Tab Completion */ el_set(el, EL_ADDFN, "ftp-complete", - "Context senstive argument completion", complete); + "Context sensitive argument completion", complete); complete_ctx.conn = conn; complete_ctx.remote_pathp = &remote_path; el_set(el, EL_CLIENTDATA, (void*)&complete_ctx);