aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/pushd.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bashrc.d/pushd.bash')
-rw-r--r--bash/bashrc.d/pushd.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/bash/bashrc.d/pushd.bash b/bash/bashrc.d/pushd.bash
new file mode 100644
index 00000000..c3e01a5e
--- /dev/null
+++ b/bash/bashrc.d/pushd.bash
@@ -0,0 +1,5 @@
+# Make pushd default to $HOME if no arguments given, much like cd
+pushd() {
+ builtin pushd "${@:-$HOME}"
+}
+