From c175751b501a3a4cb40ad4787340a597ea769be4 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:05:35 +0000 Subject: Initial revision --- Functions/pushd | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Functions/pushd (limited to 'Functions/pushd') diff --git a/Functions/pushd b/Functions/pushd new file mode 100644 index 000000000..965c774bf --- /dev/null +++ b/Functions/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