summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-08-21 02:42:35 +1000
committerDamien Miller <djm@mindrot.org>2013-08-21 02:42:35 +1000
commite0ee727b8281a7c2ae20630ce83f6b200b404059 (patch)
treea51702bd2063df0c35d43e8786070e6b56b1b45f
parentfec029f1dc2c338f3fae3fa82aabc988dc07868c (diff)
- djm@cvs.openbsd.org 2013/08/09 03:56:42
[sftp.c] enable ctrl-left-arrow and ctrl-right-arrow to move forward/back a word; matching ksh's relatively recent change.
-rw-r--r--ChangeLog4
-rw-r--r--sftp.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e4863029..2c8b45a31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,10 @@
36 being initialised so was starting at a random value from the heap 36 being initialised so was starting at a random value from the heap
37 (harmless, but confusing). 2) some error conditions were not being 37 (harmless, but confusing). 2) some error conditions were not being
38 propagated back to the caller 38 propagated back to the caller
39 - djm@cvs.openbsd.org 2013/08/09 03:56:42
40 [sftp.c]
41 enable ctrl-left-arrow and ctrl-right-arrow to move forward/back a word;
42 matching ksh's relatively recent change.
39 43
4020130808 4420130808
41 - (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt 45 - (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt
diff --git a/sftp.c b/sftp.c
index 1ddfef6b5..e21144064 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.153 2013/08/09 03:37:25 djm Exp $ */ 1/* $OpenBSD: sftp.c,v 1.154 2013/08/09 03:56:42 djm 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 *
@@ -2008,6 +2008,11 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
2008 complete_ctx.remote_pathp = &remote_path; 2008 complete_ctx.remote_pathp = &remote_path;
2009 el_set(el, EL_CLIENTDATA, (void*)&complete_ctx); 2009 el_set(el, EL_CLIENTDATA, (void*)&complete_ctx);
2010 el_set(el, EL_BIND, "^I", "ftp-complete", NULL); 2010 el_set(el, EL_BIND, "^I", "ftp-complete", NULL);
2011 /* enable ctrl-left-arrow and ctrl-right-arrow */
2012 el_set(el, EL_BIND, "\\e[1;5C", "em-next-word", NULL);
2013 el_set(el, EL_BIND, "\\e[5C", "em-next-word", NULL);
2014 el_set(el, EL_BIND, "\\e[1;5D", "ed-prev-word", NULL);
2015 el_set(el, EL_BIND, "\\e\\e[D", "ed-prev-word", NULL);
2011 } 2016 }
2012#endif /* USE_LIBEDIT */ 2017#endif /* USE_LIBEDIT */
2013 2018