: # pdscript - # written by Vicki Brown # does the work behind the pd alias (Csh or Tcsh) # requires this alias: # alias pd 'eval `pdscript \!*` > /dev/null; 0' # # use as # pd dir (equivalent to pushd dir) # pd (equivalent to popd) # # you may also want to add these to your aliases: # alias sw pushd # # foreach i (2 3 4 5 6 7 8 9) # set j = `expr $i - 1` # alias $i pd +$j # end # unset i j case $# in 0) echo popd ;; 1) echo pushd "$1" ;; *) echo "Usage: pd [dir] " > /dev/tty ;; esac