Maybe a better name would be ```getCommandWithPath```?