Transformed `adjust_cmd` into a decorator, good suggestions.

Please recheck!