[Intel-gfx] [dim PATCH 4/4] dim: run executables in $PATH named dim-subcommand as dim subcommands

Daniel Vetter daniel at ffwll.ch
Wed Apr 5 09:12:14 UTC 2017


On Wed, Apr 05, 2017 at 10:28:06AM +0300, Jani Nikula wrote:
> On Tue, 04 Apr 2017, Daniel Vetter <daniel at ffwll.ch> wrote:
> > On Tue, Apr 04, 2017 at 04:59:02PM +0300, Jani Nikula wrote:
> >> Similar to git. Don't allow override of internal commands though.
> >
> > git did this, and then went to a slightly different version because
> > git<Tab> doesn't complete to a space due to the various git-foo commands
> > in path. Imo the right way to do this is to have a libexec/ subdir,
> > complete just those (and switch the completion to recognize them), i.e.
> > git foo would run maintainer-tools/libexec/git-foo or maybe
> > maintainer-tools/git-foo. But not depend upon git-foo being in your path
> > (because that is really annoying to me).
> 
> Agreed on the annoyance. But libexec is annoying too because it
> precludes the user from adding their own extensions in $PATH. An
> alternative is to mandate a *different* prefix for external dim
> commands, for example external-dim-foo.
> 
> I'm not hung up on this patch anyway, it was just a quick idea in case
> we want to add largish related tools without cluttering the already
> pretty big dim source.

You can add the libexec path (or well, DIM_SRC/maintainer-tools) and get
both. Or do you mean adding your own extensions, not in the upstream
maintainer-tools? I'd say for that case some pressure to get tools merged
into upstream would be good :-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list