考虑功能,
function! Test()
:let aString = "I'm a string!"
:!echo aString
endfunction
现在输入:call Test()
将以下内容传递给BASH:
aString
Press ENTER or type command to continue
我如何:!echo
aString
的价值?
谢谢!
答案 0 :(得分:1)
好的,最后让它工作了:
function! Test()
:!clear
:let aString = 'I\''m a string\!'
:execute "!echo " . aString
endfunction