diff options
| author | Anton Bobov <abobov@gmail.com> | 2016-07-21 19:27:37 +0500 |
|---|---|---|
| committer | Anton Bobov <abobov@gmail.com> | 2016-07-21 19:27:37 +0500 |
| commit | 26c725916b18fc1baaae94bfd2e02e3076f53955 (patch) | |
| tree | b99dad56d08f87d89c343cdf40932a8602152076 /files/.zsh/rc/S50_functions | |
| parent | 997ee7e2e6ad81f7a9455b581e71150173cec7d4 (diff) | |
[zsh] Update aliases and functions.
Diffstat (limited to 'files/.zsh/rc/S50_functions')
| -rw-r--r-- | files/.zsh/rc/S50_functions | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/files/.zsh/rc/S50_functions b/files/.zsh/rc/S50_functions index 7998441..b3b09ff 100644 --- a/files/.zsh/rc/S50_functions +++ b/files/.zsh/rc/S50_functions @@ -7,10 +7,36 @@ ppgrep() { } stocks() { + if [ -z "$1" ] ; then + cat <<EOM +stocks NAME + +Get current stock value for NAME. + +Example: + + $ stocks GOOG + $ stocks EURUSD=x +EOM + return + fi curl -s 'http://download.finance.yahoo.com/d/quotes.csv?s='$1'&f=l1' } xe() { + if [ -z "$1" ] ; then + cat <<EOM +xe NAME + +Get exchange rates. + +Example: + + $ xe EURRUB + $ xe usdrub +EOM + return + fi stocks "$1=x" } |
