Shell\Command: Move code that builds final shell command into separate method