aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rw-r--r--sh/shrc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sh/shrc b/sh/shrc
index 8dab79c6..3e03313c 100644
--- a/sh/shrc
+++ b/sh/shrc
@@ -7,12 +7,14 @@ esac
# Don't let anyone write(1) to my terminal
command -p mesg n
-# Never beep at me
-command -p setterm -bfreq -blength 2>/dev/null
-
# Turn off flow control and control character echo
command -p stty -ixon -ctlecho 2>/dev/null
+# If setterm(1) is available, tell it never to beep at me
+if command -v setterm >/dev/null 2>&1 ; then
+ setterm -bfreq -blength 2>/dev/null
+fi
+
# Keep around 4K lines of history in memory
HISTSIZE=$((1 << 12))