Found the answer thanks to a user on the vim-use mailing list:
:let @a = system("ls -l")
To run a command with the file under the cursor as argument:
:let @a = system("ls -l " . shellescape(expand('<cfile>')))
Found the answer thanks to a user on the vim-use mailing list:
:let @a = system("ls -l")
To run a command with the file under the cursor as argument:
:let @a = system("ls -l " . shellescape(expand('<cfile>')))