summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2010-10-23 22:06:12 +0000
committersthen <sthen@openbsd.org>2010-10-23 22:06:12 +0000
commit9894905ed646cdb1d97e8883ce2d8bfe202f70eb (patch)
tree047c3b25944be933e8723d73e9a0880340ef1ac2
parentDon't leak the fd returned by mkstemp in vi_histedit error paths. (diff)
downloadwireguard-openbsd-9894905ed646cdb1d97e8883ce2d8bfe202f70eb.tar.xz
wireguard-openbsd-9894905ed646cdb1d97e8883ce2d8bfe202f70eb.zip
escape '[' in filename tab-completion; fix a type while there.
ok djm@
-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);