This also adds a test suite for that particular command, updates the documentation, and adds some examples. Fixes GH-5004