Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ksh enable emacs mode, add tab key to do completion in e...
details: https://anonhg.NetBSD.org/src/rev/13fffa1fd962
branches: trunk
changeset: 536983:13fffa1fd962
user: provos <provos%NetBSD.org@localhost>
date: Wed Sep 25 02:55:03 2002 +0000
description:
enable emacs mode, add tab key to do completion in emacs and vi mode.
from millert%openbsd.org@localhost. approved by perry and thorpej.
diffstat:
bin/ksh/emacs.c | 3 ++-
bin/ksh/ksh.Man | 5 +++--
bin/ksh/main.c | 12 +++++++++++-
3 files changed, 16 insertions(+), 4 deletions(-)
diffs (70 lines):
diff -r 7e9520339c12 -r 13fffa1fd962 bin/ksh/emacs.c
--- a/bin/ksh/emacs.c Wed Sep 25 02:41:11 2002 +0000
+++ b/bin/ksh/emacs.c Wed Sep 25 02:55:03 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emacs.c,v 1.12 2002/09/25 02:41:11 provos Exp $ */
+/* $NetBSD: emacs.c,v 1.13 2002/09/25 02:55:03 provos Exp $ */
/*
* Emacs-like command line editing and history
@@ -274,6 +274,7 @@
{ XFUNC_transpose, 0, CTRL('T') },
#endif
{ XFUNC_complete, 1, CTRL('[') },
+ { XFUNC_comp_list, 0, CTRL('I') },
{ XFUNC_comp_list, 1, '=' },
{ XFUNC_enumerate, 1, '?' },
{ XFUNC_expand, 1, '*' },
diff -r 7e9520339c12 -r 13fffa1fd962 bin/ksh/ksh.Man
--- a/bin/ksh/ksh.Man Wed Sep 25 02:41:11 2002 +0000
+++ b/bin/ksh/ksh.Man Wed Sep 25 02:55:03 2002 +0000
@@ -1,5 +1,5 @@
'\" t
-.\" $NetBSD: ksh.Man,v 1.7 2002/09/20 20:57:58 jschauma Exp $
+.\" $NetBSD: ksh.Man,v 1.8 2002/09/25 02:55:03 provos Exp $
.\"{{{}}}
.\"{{{ Notes about man page
.\" - use the pseudo-macros .sh( and .sh) to begin and end sh-specific
@@ -2170,7 +2170,7 @@
T}
vi-tabcomplete T{
In vi command line editing, do command / file name completion when
-tab (^I) is entered in insert mode.
+tab (^I) is entered in insert mode. This is the default.
T}
.TE
.sp
@@ -2923,6 +2923,7 @@
.\"}}}
.\"{{{ complete ^[^[
.IP "\fBcomplete ^[^[\fP"
+.IP "\fBcomplete ^I\fP"
Automatically completes as much as is unique of the command name
or the file name containing the cursor. If the entire remaining command
or file name is unique a space is printed after its completion, unless
diff -r 7e9520339c12 -r 13fffa1fd962 bin/ksh/main.c
--- a/bin/ksh/main.c Wed Sep 25 02:41:11 2002 +0000
+++ b/bin/ksh/main.c Wed Sep 25 02:55:03 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.8 2002/09/20 20:07:09 jschauma Exp $ */
+/* $NetBSD: main.c,v 1.9 2002/09/25 02:55:03 provos Exp $ */
/*
* startup, main loop, environments and error handling
@@ -207,6 +207,16 @@
change_flag(FPOSIX, OF_SPECIAL, 1);
#endif /* POSIXLY_CORRECT */
+ /* Set edit mode to emacs by default, may be overridden
+ * by the environment or the user. Also, we want tab completion
+ * on in vi by default. */
+#if defined(EDIT) && defined(EMACS)
+ change_flag(FEMACS, OF_SPECIAL, 1);
+#endif /* EDIT && EMACS */
+#if defined(EDIT) && defined(VI)
+ Flag(FVITABCOMPLETE) = 1;
+#endif /* EDIT && VI */
+
/* import environment */
if (environ != NULL)
for (wp = environ; *wp != NULL; wp++)
Home |
Main Index |
Thread Index |
Old Index