I could do:
!systemctl:p to get
systemctl reload bind result printed (as last command in the history starting with
but doing the same with the partial search on the command history:
!?reload:p results in
zsh: no such event: reload:p
the former looks the most recent event in the history that starts with
systemctl string and prints it on the screen, thanks to
:p modifier, instead of executing.
:p is true for
!? as well on any shell.
and bash also results in
bash: !?reload:p: event not found.
how can i achieve the printing and not executing of the found command line on partial command history search in common unix shells?