Re: How to create my own "pushd" command?
- From: Chris Davies <chris-usenet@xxxxxxxxxxxx>
- Date: Fri, 27 Apr 2012 16:46:53 +0100
www <xsli2@xxxxxxxxx> wrote:
For reasons I am unclear, our institute use ksh.
dirs() { for _P in "${PWDS[@]}" "$PWD"; do echo "$_P"; done | tac | xargs; }
pushd() { PWDS+=("$PWD"); cd "$1"; dirs; }
popd() { _P="${PWDS[@]: -1:1}"; unset PWDS[$((${#PWDS[@]} -1))]; cd "$_P"; dirs; }
Chris
.
- References:
- How to create my own "pushd" command?
- From: www
- Re: How to create my own "pushd" command?
- From: www
- How to create my own "pushd" command?
- Prev by Date: Re: How to create my own "pushd" command?
- Next by Date: Ubuntu 12.04 LTS has been released
- Previous by thread: Re: How to create my own "pushd" command?
- Next by thread: Re: How to create my own "pushd" command?
- Index(es):