diff options
author | Darren Tucker <dtucker@zip.com.au> | 2010-10-24 10:56:32 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2010-10-24 10:56:32 +1100 |
commit | d78739ab90f6561d7fef5a7de495644868e01a24 (patch) | |
tree | 275b5aa05d8cc4917d3fc4e519c9edd611e20701 /sftp.c | |
parent | a53939332dab05db474d75446211160b21a9742c (diff) |
- sthen@cvs.openbsd.org 2010/10/23 22:06:12
[sftp.c]
escape '[' in filename tab-completion; fix a type while there.
ok djm@
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.130 2010/10/05 05:13:18 djm Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.131 2010/10/23 22:06:12 sthen 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 | * |
@@ -1725,6 +1725,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path, | |||
1725 | case '"': | 1725 | case '"': |
1726 | case '\\': | 1726 | case '\\': |
1727 | case '\t': | 1727 | case '\t': |
1728 | case '[': | ||
1728 | case ' ': | 1729 | case ' ': |
1729 | if (quote == '\0' || tmp2[i] == quote) { | 1730 | if (quote == '\0' || tmp2[i] == quote) { |
1730 | if (el_insertstr(el, ins) == -1) | 1731 | if (el_insertstr(el, ins) == -1) |
@@ -1854,7 +1855,7 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2) | |||
1854 | 1855 | ||
1855 | /* Tab Completion */ | 1856 | /* Tab Completion */ |
1856 | el_set(el, EL_ADDFN, "ftp-complete", | 1857 | el_set(el, EL_ADDFN, "ftp-complete", |
1857 | "Context senstive argument completion", complete); | 1858 | "Context sensitive argument completion", complete); |
1858 | complete_ctx.conn = conn; | 1859 | complete_ctx.conn = conn; |
1859 | complete_ctx.remote_pathp = &remote_path; | 1860 | complete_ctx.remote_pathp = &remote_path; |
1860 | el_set(el, EL_CLIENTDATA, (void*)&complete_ctx); | 1861 | el_set(el, EL_CLIENTDATA, (void*)&complete_ctx); |