This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: >, >>, and "tee" operators
On Thu, Jul 25, 2002 at 01:36:29PM -0400, Andrew Cagney wrote:
> >I think this was raised before (fernando and I discussed it somewhere on
> >>gdb@). GDB is used on systems that are not even UNIX like (namely
> >>DJGPP), trying to tie the syntax to UNIX is such a good idea. GDB needs
> >>a syntax spec, the current piece meal aproach is regrettable :-(
> >>
> >>If the command was called ``log'' rather than ``tee'' then I don't think
> >>we would have problems with ``log -a''. (I'm not saying that log is the
> >>right name mind.)
> >
> >
> >Well, I find the DOS-ish '/' separator much nastier than '-' options.
>
> The `/' would most likely have come from VMS or a precursor. VMS has
> [had?] a remarkably well structured (too well structured?) CLI interface
> (I show my heritage :-).
Before my day :)
> >A question of personal taste. ``log'' unfortunately is more like
> >``tee'' than it is like redirection; how about a simple ``redirect''
> >command?
> >
> > redirect [-a[ppend]] FILE [COMMAND]
> > log [-a[ppend]] FILE [COMMAND]
>
> Or `log/a FILE [COMMAND]' or, hmm, something like:
>
> set log write FILE
> set log redirect FILE
> set log append FILE
> show log
>
> and
>
> log[/a] FILE command-that-isn't-optional
>
> Same for redirect.
I don't know about that... write/redirect/append aren't really mutually
exclusive (it's overwrite/append and redirect/tee), and that doesn't
mesh with the feeling of a set command.
> Are you proposing that ``print/FMT'' gets replaced by ``print -FMT''.
> There shouldn't be two conflicting syntaxes.
Well, I don't have a problem with reserving / for FMT sequences
(anything that modifies how output is printed) and - for options
(anything that modifies what gets done). I think '/' is only used for
format sequences right now; at least I don't see anything otherwise in
the manual besides display, print, and x. Heck, I actually think
separating format specifiers and options this way is intuitive.
So in other words, I'd like to stick with
> > redirect [-a[ppend]] FILE [COMMAND]
> > log [-a[ppend]] FILE [COMMAND]
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
- References:
- RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators
- Re: RFA: >, >>, and "tee" operators