From 805381040dd69dd02b78423d2d71913b33f3cc33 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 8 Jun 1999 09:25:39 +0000 Subject: zsh-3.1.5-pws-21 --- Functions/Misc/pushd | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Functions/Misc/pushd (limited to 'Functions/Misc/pushd') diff --git a/Functions/Misc/pushd b/Functions/Misc/pushd new file mode 100644 index 000000000..965c774bf --- /dev/null +++ b/Functions/Misc/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