Show full output of command :hi
in scratch window:
:Redir hi
Show full output of command :!ls -al
in scratch window:
:Redir !ls -al
Evaluate current line with node
and show full output in scratch window:
" current line
console.log(Math.random());
" Ex command
:.Redir !node
" scratch window
0.03987581000754448
Evaluate visual selection + positional parameters with bash
and show full output in scratch window:
" content of buffer
echo ${1}
echo ${2}
" Ex command
:%Redir !bash -s foo bar
" scratch window
foo
bar
I'm curious why you added the
-bar
option to the command definition?Im on both MacOS and Windows -- with most of my time in Windows. When I try to redirect a shell command that has an argument with a space, it fails because the
"
I try to use just becomes the beginning of the Ex command's comment.Ends up trying to invoke:
...because the
<q-args>
never includes anything from the first"
onwards.Do you have a use case of invoking this command in a
|
joined chain of commands?Side note...
I also changed the
expand('%:p')
to be "more" compatible for windows, into:shellescape(escape(expand('%:p'), '\'))
I "think" this change would still remain compatible with the *nix systems most people use most of the time.