aboutsummaryrefslogtreecommitdiff
path: root/bashrc.dot.link
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-08-31 11:43:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-08-31 11:43:15 -0300
commit3f0a6f68de0e15dc82d541a6caec6a0c408b61cb (patch)
tree555dd2871ce5173395fb8ed2b2f6a64886af4981 /bashrc.dot.link
parent9487d403eb41a9018f477a85f6ca2e60aa7f634d (diff)
downloadprofile-3f0a6f68de0e15dc82d541a6caec6a0c408b61cb.tar.gz
profile-3f0a6f68de0e15dc82d541a6caec6a0c408b61cb.tar.bz2
Turn off auto-echo for bash's CDPATH
Diffstat (limited to 'bashrc.dot.link')
-rw-r--r--bashrc.dot.link11
1 files changed, 11 insertions, 0 deletions
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