I would like to pass current filename % as argument of the shell script in system() call :
let rev=system("~/script %")
How can I do that for real ?
Try using exec:
exec 'call system("~/script " . expand("%"))'
Depending on what you want to do you might not need exec at all (like :h system() suggests):
let foo = system("~/script " . expand("%"))
Playing around with expand() (thanks kongo2002) :
let script="~/script " . expand("%")
let rev=system(script)
Works as a charm =)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With