[PATCH v2 1/1] cli: compile history code if and only if history config is selected