1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-09 06:20:45 +00:00

irssi.conf: Improve /CALC alias:

* get rid of bashism
* use command -v instead of which
* use bc -l option which allows non-integer division results


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5124 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Jilles Tjoelker 2010-03-18 00:16:18 +00:00 committed by jilles
parent 7a2c8cbdba
commit 1a4c665686

View File

@ -122,7 +122,7 @@ aliases = {
GOTO = "sb goto";
CHAT = "dcc chat";
RUN = "SCRIPT LOAD";
CALC = "exec - if which bc &>/dev/null\\; then echo '$*' | bc | awk '{print \"$*=\"$$1}'\\; else echo bc was not found\\; fi";
CALC = "exec - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi";
SBAR = "STATUSBAR";
INVITELIST = "mode $C +I";
Q = "QUERY";