[Flow] CLIs for Flow applications

Martin Kutschker masi-20l4 at typo3.org
Sun Nov 9 20:24:55 CET 2014


Hi!

If you have more than one Flow application (or libraries) then a "./flow 
help" may list quite a long list of commands. So I had the idea that 
Flow might support the old Unix binary alias trick, ie calling the same 
binary via symbolic links to get a set of default arguments.

My idea is that instead of

  ./flow surf:list

I can use

  ./surf list

simply after doing "ln -s flow surf".

It could be quite easy if a packages wouldn't be able use arbitrary 
command prefixes (eg Surf uses "surf" and "encrypt", Flow itself uses 8 
or more).

I thought about trying a smaller step:

./flow [ <package> ] <command>

So eg

./flow Typo3.Surf help

will only list commands of Surf. But that does help only a little. Going 
a step further:

./flow [ <package-without-vendor> ] <command>

No I can use

./flow Surf help

The downside is that Flow will have to look for all packages called Surf 
(TYPO3.Surf, Foobar.Surf, Mystuff.Surf). The upside is that "surf:" may 
be stripped from the command.

To make this really useful one has to use the symlink trick.

Now

  ./flow Surf list

will turn into

  ./surf list

Any comments or ideas?

Masi


More information about the Flow mailing list