Fontbakery: autocomplete check-IDs on the command line

Created on 9 Apr 2019  路  5Comments  路  Source: googlefonts/fontbakery

I think it would be useful.

P4 someday-maybe

Most helpful comment

OK! Now --list-checks is a plain clean list useful for feeding bash completion:

Screenshot at 2019-04-11 02:51:45

And I made --list-checks --verbose output a nice coloured description of the collection of checks:

Screenshot at 2019-04-11 02:37:19

Screenshot at 2019-04-11 02:36:22

All 5 comments

In order to do so, we need a way to extract a list of all available checks of a given profile.

We do have a --list-checks command line options but it is currently very ugly (so I think nobody really uses it):

Screenshot at 2019-04-11 02:07:01

I will change its output to only include the check IDs

OK! Now --list-checks is a plain clean list useful for feeding bash completion:

Screenshot at 2019-04-11 02:51:45

And I made --list-checks --verbose output a nice coloured description of the collection of checks:

Screenshot at 2019-04-11 02:37:19

Screenshot at 2019-04-11 02:36:22

I have updated the bash completion scripts to support auto-completion of check IDs. It detects which profile the user chose and only autocompletes the checks available in that profile.

It supports all of these: -c, --checkid, -x and --exclude-checkid

I have also updated setup.py so that the bash completion script is automatically installed with pip install fontbakery

I think this will be very helpful. Thank you!

:-D

Was this page helpful?
0 / 5 - 0 ratings