title: interpolate Vim function arguments and shell commands
body: <p>I've written a little .applescript file that can reload Safari.  I've tried to hook it's execution into vim's BufWritePost event, (so Safari auto-reloads on file save).</p>
  
  <p>I've placed this in my .vimrc:</p>
  
  <pre><code>function! SaveAndReloadSafari(delay) 
     " THIS IS WHERE MY PROBLEM IS&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; 
     !osascript ~/MySrc/applescript/reloadSafari.APPLESCRIPT a:delay
  endfunction
  
  if !exists("b:my_autocommands_loaded")
    let b:matts_autocommands_loaded = 1 
  
    au BufWritePost *.html,*\.css,*.js call SaveAndReloadSafari(0)
    au BufWritePost *.scss call SaveAndReloadSafari(2)
  endif
  </code></pre>
  
  <p>As you can see, I want to add a 2 second delay after saving an .scss file (to allow my SCSS files to auto-compile to CSS)</p>
  
  <p>I've confirmed that the only piece of the puzzle missing is my syntax for interpolating the a:delay with the shell command.  (Executing the command without a <code>delay</code> parameter works fine).</p>
  
  <p>What's wrong with my syntax?</p>