From 5097a207d686cfd449834c89429c40e1d488f684 Mon Sep 17 00:00:00 2001
From: David Phillips <david@sighup.nz>
Date: Sun, 16 Oct 2016 21:48:36 +1300
Subject: cd is pushd wrapper

---
 bashrc | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'bashrc')

diff --git a/bashrc b/bashrc
index 4c26cf5..98b45cd 100644
--- a/bashrc
+++ b/bashrc
@@ -53,7 +53,16 @@ alias egrep="egrep --color=auto"
 alias xpdf="xpdf -cont"
 alias feh="feh --magick-timeout=0"
 alias xclip="xclip -selection c"
+alias pd=popd
 
+cd() {
+	if [ $# -eq 0 ] ; then
+		d=$HOME
+	else
+		d=$@
+	fi
+	pushd "$d" >/dev/null
+}
 
 # u=rwx,g=,o=
 umask 077
-- 
cgit v1.1