Rectification pull request

This patch contains two commits.

- Format commit
- rectify passing string by a copy to pass it by reference in `isCmdInList()` method.