Sometimes, when I send a shell command from vim, I receive an error.
For example, when I type the following command
:!chmod +x shellescape("%"), zsh complains with :
zsh:1: unknown sort specifier shell returned 1
I know a way to fix this specific problem :
:execute "!chmod +x " . shellescape("%")
What I don't know is how to read the exact command that the shell tried to execute when I make a mistake.
The last commands are not sent directly to the shell, vim evaluates a few things before doing so. I would like to see the result of this evaluation.
I tried looking at the output of the
history command in zsh but it seems that the commands typed in vim are not logged there.