diff options
author | Eli Zaretskii <eliz@gnu.org> | 2000-04-12 16:43:27 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2000-04-12 16:43:27 +0000 |
commit | ae678129ebe35afec00cb998a01fc91f2fc03334 (patch) | |
tree | bfa9f9aac587519450d7bbca1c9215e766eba5f8 | |
parent | f0ca3dcec2ab02f45a6c049ad7d84ae2fd1bb3bb (diff) | |
download | gdb-ae678129ebe35afec00cb998a01fc91f2fc03334.zip gdb-ae678129ebe35afec00cb998a01fc91f2fc03334.tar.gz gdb-ae678129ebe35afec00cb998a01fc91f2fc03334.tar.bz2 |
* 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.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/top.c | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8a4824d..ed5d619 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 @@ -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; } } } |