We review our recent progress on the realisation of pulse shaping in passively-mode-locked fibre lasers by inclusion of an amplitude and/or phase spectral filter into the laser cavity. We numerically show that depending on the amplitude transfer function of the in-cavity filter, various regimes of advanced waveform generation can be achieved, including ones featuring parabolic-, flat-top-and triangular-profiled pulses. An application of this approach using a flat-top spectral filter is shown to achieve the direct generation of high-quality sinc-shaped optical Nyquist pulses with a widely tunable bandwidth from the laser oscillator. We also present the operation of an ultrafast fibre laser in which conventional soliton, dispersion-managed soliton (stretched-pulse) and dissipative soliton mode-locking regimes can be selectively and reliably targeted by adaptively changing the dispersion profile and bandwidth programmed on an in-cavity programmable filter. The results demonstrate the strong potential of an in-cavity spectral pulse shaper for achieving a high degree of control over the dynamics and output of mode-locked fibre lasers.