Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 3 insertions, 1 deletions
-rw-r--r--.bashrc4
diff --git a/.bashrc b/.bashrc
index 911203e..02b0bb9 100644
--- a/.bashrc
+++ b/.bashrc
@@ -258,7 +258,9 @@ export PROMPT_COMMAND="shell_var_fix;"
# Changing directory {{{
pushd() {
___dirchanged="y"
- builtin pushd "${1:-$HOME}" >/dev/null
+ set "${1:-$HOME}"
+ [ ! -e "$1" ] && set "$HOME/$1"
+ builtin pushd "$1" >/dev/null
}
popd() {
___dirchanged="$PWD"