Dynamic command output in prompt box

Would be nice to be able to write commands in a style similar to “@-tagging”.

E.g. “Take into account the following directory structure: @sh ls src/

Sorry if this has already been suggested, I tried searching.

P.S. I know you can select the output of the terminal but it’s rather cumbersome and disturbs the prompt writing flow.