• Synthetizing a composite filtering function by manipulating two filtering effects. • Constructing single-wavelength h-shaped pulses by overlapping two filtering effects. • Constructing dual-wavelength h-shaped pulses by multiplying two filtering effects. For the first time, to the best of our knowledge, we experimentally report the optical manipulation of h-shaped pulse generation in passively mode-locked fiber lasers (PMLFLs) by constructing composite filtering functions. Different composite filtering functions can be synthetized by manipulating the superposition or multiplication between different independent filtering effects in the laser cavity. Various types of h-shaped pulses, i.e., single- or dual-wavelength h-shaped pulses, can be dynamically manipulated to generate. Single-wavelength h-shaped pulses with a spike pulse and a flat-top bunch as leading and tailing edges are generated by synthetizing the superposition of F – P- and nonlinear-polarization-rotation (NPR)-based filtering effects. On the other hand, dual-wavelength h-shaped pulses operating at heterogeneous or homogeneous pulse states are formed by constructing the multiplication between Lyot- and NPR-based filtering effects. Experimental and theoretical analyses demonstrate that the synthetized composite filtering functions are beneficial to the artificial manipulation of generating different types of h-shaped pulses. Our work contributes to a deeper understanding of the dynamics of h-shaped pulses and provides an efficient way to generate nonlinear pulses with special profiles. [ABSTRACT FROM AUTHOR]