diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2013-08-09 03:56:43 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2013-08-09 03:56:43 +0000 |
commit | 146e052305e10c595562c7c190348c4237bfd2d4 (patch) | |
tree | b5134ac9a55ed417c6551b8556f4308748d38ac7 | |
parent | 31b3cc7b0caec28250a0a308bfb5f9c57b935bbd (diff) |
enable ctrl-left-arrow and ctrl-right-arrow to move forward/back a word;
matching ksh's relatively recent change.
-rw-r--r-- | usr.bin/ssh/sftp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 7445f695860..f6c67f33479 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.153 2013/08/09 03:37:25 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.154 2013/08/09 03:56:42 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -1984,6 +1984,11 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2) complete_ctx.remote_pathp = &remote_path; el_set(el, EL_CLIENTDATA, (void*)&complete_ctx); el_set(el, EL_BIND, "^I", "ftp-complete", NULL); + /* enable ctrl-left-arrow and ctrl-right-arrow */ + el_set(el, EL_BIND, "\\e[1;5C", "em-next-word", NULL); + el_set(el, EL_BIND, "\\e[5C", "em-next-word", NULL); + el_set(el, EL_BIND, "\\e[1;5D", "ed-prev-word", NULL); + el_set(el, EL_BIND, "\\e\\e[D", "ed-prev-word", NULL); } remote_path = do_realpath(conn, "."); |