Using variables in a vim shell command

Viewed 10893

How would I go about using a variable in a vim shell command (one done with !) in a vimscript? For instance, something kind of like this: (just an example, not what I'm really trying to do)

function Ls(dir)
    !ls a:dir
endfunction
1 Answers
Related