Temporal reshaping of the electric field of few-optical-cycle pulses in a low-density ionizing gas has been used to achieve control of the electron trajectories in the process of high-order harmonic generation. As a result of such a quantum path control mechanism, isolated or multiple attosecond pulses have been produced, depending on the carrier-envelope phase of the driving field. In particular, complete spectral tunability of the harmonic peaks over the whole spectral range has been demonstrated. Experimental results have been interpreted using a nonadiabatic three-dimensional propagation model and a nonadiabatic stationary phase model.