diff options
| author | Tanaka Akira <akr@users.sourceforge.net> | 1999-06-08 09:26:01 +0000 |
|---|---|---|
| committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-06-08 09:26:01 +0000 |
| commit | fcd7cd1cfa2ba286f4bf73da7a60116cd3912629 (patch) | |
| tree | d2aa5a9369bf3af8841d3abde69f52bd483f5526 /Functions/Misc/pushd | |
| parent | Initial revision (diff) | |
| download | zsh-fcd7cd1cfa2ba286f4bf73da7a60116cd3912629.tar zsh-fcd7cd1cfa2ba286f4bf73da7a60116cd3912629.tar.gz zsh-fcd7cd1cfa2ba286f4bf73da7a60116cd3912629.tar.bz2 zsh-fcd7cd1cfa2ba286f4bf73da7a60116cd3912629.tar.lz zsh-fcd7cd1cfa2ba286f4bf73da7a60116cd3912629.tar.xz zsh-fcd7cd1cfa2ba286f4bf73da7a60116cd3912629.tar.zst zsh-fcd7cd1cfa2ba286f4bf73da7a60116cd3912629.zip | |
Initial revision
Diffstat (limited to 'Functions/Misc/pushd')
| -rw-r--r-- | Functions/Misc/pushd | 13 |
1 files changed, 13 insertions, 0 deletions
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 |
