From b06ab834a5270f76db1935f30940458aa252b1d6 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Tue, 29 Oct 2019 22:51:27 +0100 Subject: [PATCH] Make bash output redirection safer --- dotfiles/.bashrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index 2d616d0..95da8a0 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -41,6 +41,9 @@ bashrc_customize_environment() { } bashrc_customize_shell_options() { + # Prevent overwriting files by mistake with output redirection. + set -o noclobber + local option for option in cdspell checkwinsize globstar histappend nocaseglob do