This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] use filename_completer for add_setshow_optional_filename_cmd
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- Date: Tue, 1 Jul 2008 23:02:38 +0100
- Subject: Re: [RFA] use filename_completer for add_setshow_optional_filename_cmd
- References: <000001c8dbc2$b1d7afe0$15870fa0$@u-strasbg.fr>
(following the spirit of speaking up if you spent the time
looking at the patch)
A Tuesday 01 July 2008 22:37:42, Pierre Muller wrote:
> I discovered that
> set debug-file-directory does not use filename_completer.
>
> This is because add_setshow_optional_filename_cmd
> does not set the set completer to filename completer,
> contrary to add_setshow_filename_cmd.
>
> Is there any reason for this?
> Or is it just a bug?
IMHO, it's just a feature miss.
> The following small patch fixes this
> by setting the set part completer to filename_completer
> for add_setshow_optional_filename_cmd
> exactly as is done in add_setshow_filename_cmd.
>
> There are currently only three adffected commands:
>
> "set debug-file-directory"
> "set args"
> "set solib-search-path"
>
> Only the second one might be questionable,
> but I also find that it is reasonable to have filename
> completion for "set args" as this is now done on
> most shells.
>
IMHO, it does make more sense to have a filename completer
in "set args," than a default symbol completer. You're normally
not very interested in passing symbol names as arguments to
your program.
> Is this OK to commit?
FWIW, looks good to me.
--
Pedro Alves