fish home | Main documentation page | Design document | About fish | External commands | How fish differs from other shells | Builtin commands | License

About fish

About the program

fish is meant to be used for interactive shell tasks on a modern UNIX-like workstation. It is much more important for me to keep the code maintainable, readable and bug free than to support esoteric old hardware, software or wetware. As such, the program is often wildly inefficient in its use of memory and CPU cycles. On my system, fish uses a little less than half a megabyte of memory, a number that could be significantly reduced with a little effort. fish performs a lot of linear searches of things that could be done in logarithmic time, does not usually cache file system data or other search result, and uses the fork() call promiscuosly. None of these things matter because fish is still fast enough to be perceived as instantaneous on a semi-modern computer thanks to the miracles of copy-on-write, OS-level caching and Moores law, and it only uses a fraction of the memory used by most terminal emulators to display it. If this program was anything other than an amusing hobby for me, I would of course feel otherwise, but since my time is limited, this is the way it must be.

About the source code

Fish is written using the ellemtel indentation style, using four space tabs. fish regularly performs a large set of sanity checks to make sure it is in a sane state. If not, the program will terminate before it can do any harm.

Do not edit the file builtin_help.c, it is automatically generated.

About the documentation

The documentation for fish is written for Doxygen. All header files are pretty heavily commented.

Since it was desirable to use the same text files for producing the HTML documentation as for producing the internal help output, some rather ugly kludges had to be used for writing the documentation for the builtin commands.

The directory doc_src contains a file called doc.hdr, containing various general documentation for fish, and a large number of .txt files. Each txt file contains the documentation for one fish builtin. When creating the main doxygen documentation, all these files are concatenated into one file, called doc.h. When creating the internal documentation, each of the .txt files is converted to a .h file by supplying a doxygen header/footer. These headers are then converted into man style manuals, which in turn are converted to C code by a script called gen_hdr.sh. The resulting C-file, builtin_help.c, can then by linked into fish. This method is probably not the most robust, elegant or clever method for generating documentation. If someone has a suggestion of how to do i better, please notify me.


Generated on Thu Jan 19 15:10:34 2006 for fish by  doxygen 1.4.6