Pass word at cursor to 'run' function?

Help
2009-10-07
2013-05-02
  • Mike Sanders
    Mike Sanders
    2009-10-07

    Is there any way to pass the word at the cursor to 'run'? Example:

    :def foo run, "script.sh $WORD_AT_CURSOR", rtn

    I know 'filt' can manage something close, but in this case, I'm not wanting to insert any data back into the document, but rather only pass the word to an external program. eg:

    lynx google-for-word-at-cursor