cli: more flexible generic arg parser