From 95012843e6dc9197bbcecf77eb655cbed370b88d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 10 Feb 2014 10:54:53 +1300 Subject: Use -r test consistently rather than -f Implicitly check whether file exists and is legible --- bash/bashrc.d/mysql.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash/bashrc.d/mysql.bash') diff --git a/bash/bashrc.d/mysql.bash b/bash/bashrc.d/mysql.bash index fb1f7126..488fb02c 100644 --- a/bash/bashrc.d/mysql.bash +++ b/bash/bashrc.d/mysql.bash @@ -15,7 +15,7 @@ fi # mysql() { local config="$HOME"/.mysql/"$1".cnf - if [[ -f $config ]]; then + if [[ -r $config ]]; then shift command mysql --defaults-extra-file="$config" "$@" else -- cgit v1.2.3