Re: Use external editor in 'commands' command

Daniel Jacobowitz
2009-01-16T23:38:09Z

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