lsh
lsh

Reputation: 658

organising Fabric's command list output

I have a Fabric fabfile.py with a long list of commands (and growing). When I go fab -l I can't see the top of the command list. Grouping the commands under headers wouldn't make the list any shorter but it would make skimming the list easier - rather like the output of Django's ./manage.py help command. Has anyone solved this problem?

Upvotes: 4

Views: 356

Answers (1)

orokusaki
orokusaki

Reputation: 57158

Using Fabric's "new style" tasks, you can take advantage of namespaces. When you list your tasks, you can provide the -F (--list-format) argument, providing nested as the value, which will list the available tasks in a nested fashion, by namespace, the appearance of such is documented here.

Fabric's "nested" task listing isn't quite as neat looking as Django's management command separation that lists commands by app in a very neat fashion, but it's a start.

Upvotes: 2

Related Questions