aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/bc.bash3
1 files changed, 3 insertions, 0 deletions
diff --git a/bash/bashrc.d/bc.bash b/bash/bashrc.d/bc.bash
index 1a963708..643678ac 100644
--- a/bash/bashrc.d/bc.bash
+++ b/bash/bashrc.d/bc.bash
@@ -1,3 +1,6 @@
+# This function is only applicable if bc(1) has the non-POSIX -q option
+command bc -q </dev/null >&0 2>&0 || return
+
# Don't print the bc(1) welcome message
bc() {
command bc -q "$@"