Allow optional arguments anywhere in the command

This fixes the tab completion of the action name and goal contents
by ignoring any argument beginning with a '-'

Fixes #2