aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-05-15 14:29:07 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-05-15 14:29:07 +1200
commitf899e7093c4f3831da32be7f092ac81129ed6d74 (patch)
treec29ef3804c33985b9641c48d6dead94aedcaef09
parentSlightly more elegant grep/ls colouring (diff)
downloaddotfiles-f899e7093c4f3831da32be7f092ac81129ed6d74.tar.gz
dotfiles-f899e7093c4f3831da32be7f092ac81129ed6d74.zip
Alias --safe-updates switch for MySQL
It seldom interferes with the stuff that I meaned to do, and almost always stops the stuff I didn't. Besides, if I wanted to delete a whole table, I'd use TRUNCATE; faster and less ambiguous.
-rw-r--r--bash/bashrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 169c6690..ec74415a 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -45,6 +45,9 @@ if grep --help | grep -q -- --color; then
alias grep='grep --color=auto'
fi
+# Protect innocent MySQL databases from my stupidity.
+alias mysql='mysql --safe-updates'
+
# Use completion, if available.
if [ -e /etc/bash_completion ]; then
. /etc/bash_completion