Move common command code into single function; from Maximilian Gass.

1 file changed