summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-08-04 19:11:15 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-08-04 19:11:15 +0000
commit2307bb91f2e40e22872556cf51d7ba9f15527e4d (patch)
treecf5d89d4a4009993abf72a50d4ee8861ed5c8105 /bin
parent376717cab17215a5bfc88c7a2b38d8e6d548cb90 (diff)
Turn <tab> completion on by default for people used to bash, tcsh, etc...
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/emacs.c3
-rw-r--r--bin/ksh/ksh.15
-rw-r--r--bin/ksh/ksh.1tbl5
-rw-r--r--bin/ksh/main.c8
4 files changed, 14 insertions, 7 deletions
diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c
index afc20909918..ea035cf4cd0 100644
--- a/bin/ksh/emacs.c
+++ b/bin/ksh/emacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emacs.c,v 1.10 1999/07/14 13:37:23 millert Exp $ */
+/* $OpenBSD: emacs.c,v 1.11 1999/08/04 19:11:13 millert Exp $ */
/*
* Emacs-like command line editing and history
@@ -272,6 +272,7 @@ static struct x_defbindings const x_defbindings[] = {
{ XFUNC_transpose, 0, CTRL('T') },
#endif
{ XFUNC_complete, 1, CTRL('[') },
+ { XFUNC_complete, 0, CTRL('I') },
{ XFUNC_comp_list, 1, '=' },
{ XFUNC_enumerate, 1, '?' },
{ XFUNC_expand, 1, '*' },
diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1
index 8fb2f997879..e20c4d7d790 100644
--- a/bin/ksh/ksh.1
+++ b/bin/ksh/ksh.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ksh.1,v 1.24 1999/07/14 15:18:49 aaron Exp $
+.\" $OpenBSD: ksh.1,v 1.25 1999/08/04 19:11:14 millert Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -3220,7 +3220,7 @@ If this option is not set, characters in the range 128-160 are printed as is,
which may cause problems.
.It Ic vi-tabcomplete
In vi command-line editing, do command and file name completion when tab (^I)
-is entered in insert mode.
+is entered in insert mode. This is the default.
.El
.Pp
These options can also be used upon invocation of the shell. The current set of
@@ -4162,6 +4162,7 @@ the beginning of the line and the line is entered (as if return had been
pressed); otherwise, the existing comment characters are removed and the cursor
is placed at the beginning of the line.
.It Ic complete ^[^[
+.It Ic complete ^I
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 it is a directory name
diff --git a/bin/ksh/ksh.1tbl b/bin/ksh/ksh.1tbl
index a5cb70425e4..f4cb5780d01 100644
--- a/bin/ksh/ksh.1tbl
+++ b/bin/ksh/ksh.1tbl
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ksh.1tbl,v 1.24 1999/07/14 15:18:49 aaron Exp $
+.\" $OpenBSD: ksh.1tbl,v 1.25 1999/08/04 19:11:14 millert Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -3220,7 +3220,7 @@ If this option is not set, characters in the range 128-160 are printed as is,
which may cause problems.
.It Ic vi-tabcomplete
In vi command-line editing, do command and file name completion when tab (^I)
-is entered in insert mode.
+is entered in insert mode. This is the default.
.El
.Pp
These options can also be used upon invocation of the shell. The current set of
@@ -4162,6 +4162,7 @@ the beginning of the line and the line is entered (as if return had been
pressed); otherwise, the existing comment characters are removed and the cursor
is placed at the beginning of the line.
.It Ic complete ^[^[
+.It Ic complete ^I
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 it is a directory name
diff --git a/bin/ksh/main.c b/bin/ksh/main.c
index 0daba4eefa1..013cfb32ff3 100644
--- a/bin/ksh/main.c
+++ b/bin/ksh/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.16 1999/07/15 20:39:40 millert Exp $ */
+/* $OpenBSD: main.c,v 1.17 1999/08/04 19:11:13 millert Exp $ */
/*
* startup, main loop, environments and error handling
@@ -211,10 +211,14 @@ main(argc, argv)
Flag(FSH) = 1;
/* Set edit mode to emacs by default, may be overridden
- * by the environment or the user. */
+ * 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)