I have a command like:
Now i want to use the last parameter inside another command with history extension inside a zsh. My other command have a leading colon ":" in it, so I want a result of:
And I try it with linux bash history extension like the following:
The :s will be interpret as a modifier and the result is:
So, the needed colon is missing.
Real scenario is more useful and uses git commands (git show branch:file), but this echo example is easier to reproduce on each system.
I already have tried to use "\" as an escaping for the colon which don't work ("\" is printed in the result too) And I have tried to use a valid modifier so that the second colon would not be interpret but it also don't work.
So I tried this:
which results in:
zsh: substitution failed