I would like to know what a command would look like if I entered a substring of this command. I'm not interested in the result, but in the history expansion.
The purpose of this is to show in an interactive way, how the expansion works in zsh.
For example, let's say I want to illustrate the usage of zsh history modifiers:
mv /Volumes/hdd1/path/to/a/file.foo !#$:r:s/foo/bar/ # moves and renames at the same time ....................................0123456789abcdef
(The line above is a rule for referencing substrings in this question)
Some of the substrings are valid, some are not.
I would like for each substring ending at [0..f], to execute the history expansion, as if I typed TAB after each character in [0..f].