[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnu-arch-users] Re: talk amongst yourselves: "iterated" operations over
From: |
Robert Anderson |
Subject: |
[Gnu-arch-users] Re: talk amongst yourselves: "iterated" operations over configs |
Date: |
15 Sep 2003 22:44:14 -0700 |
On Mon, 2003-09-15 at 22:33, Miles Bader wrote:
> Robert Anderson <address@hidden> writes:
> > tla catcfg | awk '{print $1}' | xargs -n1 -i tla what-changed --dir
> >
> > There's quite a few commands which could be "iterated" like this over
> > the project trees in a config. I think it's worth thinking about a way
> > of trying to systematize such operations and build them into the cli.
> >
> > My first guess at a decent cli is to provide an argument analogous to
> > the usual --dir argument; I guess --config is the most obvious choice.
>
> I agree that this is worth improving, but I'm not sure what your
> suggestion is; do you mean that --config would take a config argument
> (like build-config does), and apply that config similar to the pipeline
> you suggested above?
Yes, analogous to the --dir argument as I said.
Explicitly:
% tla what-changed --config emf.net/devo.tla
> I think that would be annoying since it would require you to always
> specify the config.
As opposed to what? That seems like precisely the point of the command:
"iterate over config X".
> In my current usage, I've used Tom's config to make my tla source tree,
> but I don't really want to use the original config after that, because
> I've replaced parts of the tree with my own.
Then specify whatever config you want to iterate over. Seems pretty
straightforward.
> Because of this I use a similar, but crucially different, pipeline:
>
> tla inventory --trees --nested | xargs -n1 tla CMD --dir
Well, as you said, this is different. This is 'iterate on all nested
trees' not 'iterate on trees listed in this config.'
I think they are both potentially useful, but I think since configs are
an arch-supplied mechanism, it makes sense to support them natively
before working on "other iterated things you might often do."
> For this particular usage, a similar `--nested' option would be very
> convenient, e.g., the above would be replaced by:
>
> tla CMD --nested
>
> As for --config, well, I'm not yet a willing user, so I'll leave that
> to others, but it does seem like it would be annoying to have to keep
> track of the config; maybe if build-config stashed away the config name
> in {arch}/=current-config it could be read by --config or something...
I'm not sure what you mean by 'keep track of the config.' What's to
keep track of?
Bob
Re: [Gnu-arch-users] talk amongst yourselves: "iterated" operations over configs, Robert Anderson, 2003/09/16