[RFA] use filename_completer for add_setshow_optional_filename_cmd
Pedro Alves
pedro@codesourcery.com
Tue Jul 1 22:03:00 GMT 2008
(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
More information about the Gdb-patches
mailing list