From 6937dcd394e74163c3651a88b79d35c65cc935e1 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 2 Apr 2001 12:27:06 +0000 Subject: moved from ./Functions/Misc/pushd --- Functions/Example/pushd | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Functions/Example/pushd diff --git a/Functions/Example/pushd b/Functions/Example/pushd new file mode 100644 index 000000000..965c774bf --- /dev/null +++ b/Functions/Example/pushd @@ -0,0 +1,13 @@ +# pushd function to emulate the old zsh behaviour. With this function +# pushd +/-n just lifts the selected element to the top of the stack +# instead of just cycling the stack. + +emulate -R zsh +setopt localoptions + +if [[ ARGC -eq 1 && "$1" == [+-]<-> ]] then + setopt pushdignoredups + builtin pushd ~$1 +else + builtin pushd "$@" +fi -- cgit 1.4.1