cmd parsing