2.2. Basic food searches

Because Pantry works by copying and changing foods from food files, you'll first need a food file with interesting foods in it. The Pantry distribution contains a file named master. It contains over 7,000 foods, which should be enough to get you started. Copy this file to a convenient place (I'd suggest ~/pantry/master unless you have a better idea) because you'll be using it often and you might even want to change it. Change to the directory that contains your copy and we'll get started!

Like many Unix commands, the synopsis of the pantry command takes zero or more arguments and zero or more options, that is: pantry [OPTIONS] [FILE ...] . FILE specifies the file you wish to search for foods. pantry will search using OPTIONS that you may specify. OPTIONS also perform many other useful tasks, such as modifying the traits of the foods pantry finds, printing reports of the foods pantry finds, and adding the resuls to files.

For a simple example, run pantry --name Bananas master in the same directory as the file containing your master file. What happens? Well, as far as you can tell, nothing. But things actually were happening behind the scenes. First, pantry examined every food in master. Because you specified a search option, --name Bananas, Pantry copied all foods matching that criterion into a buffer. However, you did not tell pantry to actually do anything with the buffer. So pantry terminated without showing you anything at all, and returned you to your command prompt. The buffer that pantry made is gone, never to be seen nor heard from again.