The Section Folder Stacks gives an overview of this package. Here is the pof script (you might want to open it in a separate browser window). To install it, see the Section Programs in This Book's Archive.
pof is a script with many links (names): puf, lsf, clrf, and pof1, pof2, ..., through pof8. If you install it from the archive file, give all these link names to tar and it will create the links automatically. If you get the individual pof file, use ln to make the links by hand.
The script isn't very complicated, though you'll need to be fairly familiar with Bourne Shell programming to catch some of it. For instance, the script uses the command-line parameters to store the folder stack -- like this:
set x `folder -list`; shiftAfter that command, $1 contains the current folder (the "front" or "left-hand side" of the folder -list output). $2 has the second word in that list: the top of the folder stack. $* has the entire list. And so on.
One other thing worth mentioning: for efficiency, I used as many built-in Bourne shell commands as I could. For instance, the UNIX expr command (for counting) isn't built in, so the script uses a shell variable with a list of numbers. Users with slow computers will (hopefully) appreciate this slightly-kludgey code.
This file first appeared in the updated online edition of the book MH & nmh: Email for Users & Programmers, by Jerry Peek. It is freely available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see COPYING.
Copyright © 1997 Jerry Peek
Last modified: 2006-05-31 15:13:43 -0700