commit b4f5fdae59e39090f86b3999db266d80142d73fe
parent 162c967e495523e3a0681e555a8152d941f4a0a4
Author: Ed van Bruggen <edvb54@gmail.com>
Date: Sat, 6 May 2017 22:16:22 -0700
calc: Use mathlib in bc
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/calc b/calc
@@ -6,7 +6,7 @@ dmenucmd="dmenu -p Calc $@"
# run dmenu calculator while the result is not empty
while : ; do
# use contents of clipboard as option, pass into bc to be calculated
- result=$(xsel -o -b | $dmenucmd | xargs echo | bc 2>&1)
+ result=$(xsel -o -b | $dmenucmd | xargs echo | bc -l 2>&1)
if [[ $result ]]; then # if result is empty (the last one), don't copy it to clipboard
printf "$result" | xsel -b
fi