Closed harmony7 closed 2 months ago
👋🏻
I agree it would be nice to expose the enum inputs but that feels like a lot of extra visual noise because they are pretty much the same except for lowercase/underscores.
I would say, have the product names only show when --verbose
is set but that also isn't ideal.
Another option might be to just replace the friendly name with the product name, less duplication and is easily copy/pastable.
Another option might be to have a mapping between the friendly name and the enum (e.g. allow friendly name to be provided, and then see if it can be converted to a product name and matched). The downside of this is the implementation would have to change from being an 'enum flag' to a basic 'string flag' and you lose some type safety.
So if I had to choose I'd say just replace the friendly name output with the enum variant.
Problem
Whenever I need to see which self-service products are available and/or current statuses for a fastly service, I use the
fastly products
command line and I am given output that looks like the following, which lists the products by their "friendly name":To actually enable or disable them however I need to refer to them by their internal name, which are not available in the above output.
Once I get this error message I will know what to actually type:
Proposed solution
The solution I would like would be to include the internal name in the command output, something like this:
Workaround
By the way, as a workaround you can currently use the
--json
output to get output including just the internal names: