* top.c (gdb_completer_file_name_break_characters): New variable.

(line_completion_function): When completing on file names, use
	gdb_completer_file_name_break_characters as word break
	characters for the readline library.
This commit is contained in:
Eli Zaretskii 2000-04-12 16:43:27 +00:00
parent f0ca3dcec2
commit ae678129eb
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2000-04-12 Eli Zaretskii <eliz@is.elta.co.il>
* top.c (gdb_completer_file_name_break_characters): New variable.
(line_completion_function): When completing on file names, use
gdb_completer_file_name_break_characters as word break
characters for the readline library.
2000-04-12 Mark Kettenis <kettenis@gnu.org>
* i387-tdep.c (print_i387_value): Avoid call to

View File

@ -1833,6 +1833,12 @@ char *gdb_completer_word_break_characters =
char *gdb_completer_command_word_break_characters =
" \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,";
/* When completing on file names, we remove from the list of word
break characters any characters that are commonly used in file
names, such as '-', '+', '~', etc. Otherwise, readline displays
incorrect completion candidates. */
char *gdb_completer_file_name_break_characters = " \t\n*|\"';:?/><";
/* Characters that can be used to quote completion strings. Note that we
can't include '"' because the gdb C parser treats such quoted sequences
as strings. */
@ -2122,6 +2128,9 @@ line_completion_function (text, matches, line_buffer, point)
/* It is a normal command; what comes after it is
completed by the command's completer function. */
list = (*c->completer) (p, word);
if (c->completer == filename_completer)
rl_completer_word_break_characters =
gdb_completer_file_name_break_characters;
}
}
else
@ -2168,6 +2177,9 @@ line_completion_function (text, matches, line_buffer, point)
{
/* It is a normal command. */
list = (*c->completer) (p, word);
if (c->completer == filename_completer)
rl_completer_word_break_characters =
gdb_completer_file_name_break_characters;
}
}
}