Reputation: 4034
When I run fc -l -20
in my zsh, I get the expected output.
However when running the same from within vim like so:
:r! fc -l -20
I get error saying: zsh:fc:1: no such event: 0
Why is that, and how to get my previous 20 history list entries into vim?
Upvotes: 0
Views: 114
Reputation: 8657
fc
is a shell builtin and as such would have to be called from within your shell. Alternatives are fc -l -20 | vim -
or maybe <c-Z>
fc -l -20 | pbcopy
%
"*p
.
Upvotes: 3