summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2016-10-16 21:48:36 +1300
committerDavid Phillips <david@sighup.nz>2016-10-16 21:48:36 +1300
commit5097a207d686cfd449834c89429c40e1d488f684 (patch)
tree815ef5434979ceb73e19c48dab9506d6403c3c44
parent2372158b5843491b16b1069e1b64b5e370665ee8 (diff)
downloaddotfiles-5097a207d686cfd449834c89429c40e1d488f684.tar.xz
cd is pushd wrapper
-rw-r--r--bashrc9
1 files changed, 9 insertions, 0 deletions
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