Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/rc/dirs
#!/bin/rc # dirs - print the directory stack # fn dirs {. /bin/dirs $*} cflag=0 while(~ $1 -*){ switch($1){ case -c cflag=1 } shift } if(~ $cflag 1) dirstack=() if not echo `{pwd} $dirstack status=''