The question is tagged
zsh
. zsh
does not use .bashrc
. In interactive zsh
your command results in can't trap SIGSTP in interactive shells
. In interactive bash
the command itself "works", but since interactive bash
with job control enabled runs things in separate process groups, SIGTSTP that gets to a job does not get to the shell. One needs a second Ctrl+z to activate the trap. So this is not "in one keypress" even in bash
.