* main.c (complete_command): New command, from Rick Sladkey

<jrs@world.std.com>.
	(symbol_completion_function): Don't declare rl_point and
	rl_line_buffer; they are now declared in readline.h.
	(show_commands): Don't declare history_base; it is declared in
	history.h.
	* command.c (lookup_cmd): Don't delete trailing whitespace.
This commit is contained in:
Jim Kingdon
1994-03-24 15:00:52 +00:00
parent ad15bea9df
commit 0997322359
3 changed files with 50 additions and 6 deletions

View File

@@ -684,12 +684,15 @@ lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
struct cmd_list_element *last_list = 0;
struct cmd_list_element *c =
lookup_cmd_1 (line, list, &last_list, ignore_help_classes);
#if 0
/* This is wrong for complete_command. */
char *ptr = (*line) + strlen (*line) - 1;
/* Clear off trailing whitespace. */
while (ptr >= *line && (*ptr == ' ' || *ptr == '\t'))
ptr--;
*(ptr + 1) = '\0';
#endif
if (!c)
{