summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2010-10-23 22:06:13 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2010-10-23 22:06:13 +0000
commit4f8b2f3c313f5d4001ac0093c82f0f68c8b126c1 (patch)
tree3361a41c489813e46f24fbf4a09c715942563c3d /usr.bin
parent8f087f5c116d861a586e0c18ac0c423886dac17b (diff)
escape '[' in filename tab-completion; fix a type while there.
ok djm@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sftp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c
index 1ab90cf334b..466a0c15afb 100644
--- a/usr.bin/ssh/sftp.c
+++ b/usr.bin/ssh/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 <djm@openbsd.org>
*
@@ -1701,6 +1701,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)
@@ -1828,7 +1829,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);