From 8ae28bf9d1fe80ae50ddcb4655ebaf03981e2ef7 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 18 Oct 2024 17:13:19 +0200 Subject: [PATCH] addet math function --- .zshrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 3a7fa38..d913668 100644 --- a/.zshrc +++ b/.zshrc @@ -520,9 +520,16 @@ _tools_(){ has $pkgs } fi - } +if command_exists bc; then + math() { + echo "$*" | bc -l + } +else + echo_error "No bc, so no math will work" +fi + main(){ get_packager _init