home *** CD-ROM | disk | FTP | other *** search
- #!c:sksh
-
- #*************************************************************************
- # This function displays the directory stack.
- #*************************************************************************
-
- local _stack
-
- if [ "$1" = '-?' ]
- then
- echo 'Usage:' $(basename $0)
- echo ' (displays directory _stack)'
- return 1
- fi
-
- # --- use _stack so we don't mess up the original -------------------------
-
- _stack="$DIRSTACK"
-
- # --- print out all the components of the stack, one per line -------------
-
- while [ -n "$_stack" ]
- do
- echo $(car "$_stack" ',')
- _stack = $(cdr "$_stack" ',')
- done
-