aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/popd.fish
diff options
context:
space:
mode:
Diffstat (limited to 'share/functions/popd.fish')
-rw-r--r--share/functions/popd.fish13
1 files changed, 13 insertions, 0 deletions
diff --git a/share/functions/popd.fish b/share/functions/popd.fish
new file mode 100644
index 00000000..f8b8a532
--- /dev/null
+++ b/share/functions/popd.fish
@@ -0,0 +1,13 @@
+
+function popd -d (_ "Pop dir from stack")
+ if test $dirstack[1]
+ cd $dirstack[1]
+ else
+ printf (_ "%s: Directory stack is empty...") popd
+ return 1
+ end
+
+ set -e dirstack[1]
+
+end
+