basho / clique

CLI Framework for Erlang
Apache License 2.0
147 stars 49 forks source link

Add config formatter support to clique #37

Closed nickelization closed 9 years ago

nickelization commented 9 years ago

This adds a new feature to clique whereby formatter functions can be registered to control how different config values are displayed via the "show" command. This is sometimes useful if the user-facing config value defined by cuttlefish is subjected to a translation, yielding a resulting value which makes sense to the underlying Erlang code, but may be confusing to the end user. By registering a config formatter for that config, the underlying value can be translated back into a user-friendly value for display purposes.

This allows us to address the problems described in issue #1.

jadeallenx commented 9 years ago

This looks good to me. @andrewjstone Thoughts?

andrewjstone commented 9 years ago

I'll look it over today

andrewjstone commented 9 years ago

:+1: Nice work @nickelization