This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use external editor in 'commands' command


On Fri, Jan 16, 2009 at 08:08:06PM -0200, Alfredo Ortega wrote:
> About the "/bin/ex" issue, to maintain consistency I did it the same
> way that the EDIT command, here:
> 
> gdb/cli/cli-cmds.c:695
> 
>   if ((editor = (char *) getenv ("EDITOR")) == NULL)
>       editor = "/bin/ex";

If possible, please put this logic in just one place in the source.

It looked like your patch changed the behavior of the "commands"
command.  I don't think that's a good idea; it'll break things all
over the place.  Can this be a new command instead?  I'd suggest
"edit commands" except that already has a meaning; it'll try to
edit a source file containing a function named "commands".
Anyone got a better idea than edit-commands?

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]