sort commands and options