refactor parsing args in garfield-shell