From 3f0a6f68de0e15dc82d541a6caec6a0c408b61cb Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 31 Aug 2015 11:43:15 -0300 Subject: Turn off auto-echo for bash's CDPATH --- bashrc.dot.link | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bashrc.dot.link') diff --git a/bashrc.dot.link b/bashrc.dot.link index 64afdaa..ed3e361 100644 --- a/bashrc.dot.link +++ b/bashrc.dot.link @@ -2,5 +2,16 @@ # Bash rc file # +# See http://superuser.com/questions/90535/how-do-i-turn-of-auto-echo-in-bash-when-i-cd +function cd { + if [ -z "$*" ]; then + destination=~ + else + destination=$* + fi + + builtin cd "${destination}" > /dev/null +} + # Load the profile . $HOME/.profile -- cgit v1.2.3