From d49e4093e721bb06c46e3837c43f38baf1af1a41 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Mon, 7 Mar 2016 17:52:55 +1100 Subject: [PATCH] bash: Don't allow stdout redirection to overwrite existing files --- .bash/interactive | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bash/interactive b/.bash/interactive index 88d6f34..cc4ca57 100644 --- a/.bash/interactive +++ b/.bash/interactive @@ -167,7 +167,8 @@ shopt -s checkwinsize # Don't attempt to tab-complete an empty line shopt -s no_empty_cmd_completion - +# Prevent overwriting existing files on stdout redirection +set -o noclobber # Local customisations [ -r "${HOME}/.bash/interactive_local" ] && source "${HOME}/.bash/interactive_local" -- 2.39.2