anazimok / stockworkflow

Alfred workflow to get stock quotes
12 stars 4 forks source link

Add support for instant on-the-fly stock quote lookup #1

Open kopertop opened 11 years ago

kopertop commented 11 years ago

You can easily add support for looking up a generic stock quote on-the-fly by changing the "stock" script, at the very top do this:

#!/bin/bash

cat << EOB
<?xml version="1.0"?>
<items>
EOB
SYMBOLS="{query}"
if [ -z "$SYMBOLS" ]
then
  SYMBOLS=$(cat "$(pwd)/symbols" | sort -u | grep -v '^$');
fi
kopertop commented 11 years ago

You would also want to set "with argument" as "optional" and check "with space"