added --list support

For more details please check the dev mailing list and the [JIRA issue](https://issues.apache.org/jira/browse/CB-8168)
Please split fixes to code style from feature work -- i.e. they should be distinct commits (you can put them together in the same pull request).