Copyright © 2019,2021 by Thomas E. Dickey
This is a collection of notes and links related to the dired program.
Very briefly: the name "dired" has been applied to a succession of programs (and parts of programs) for editing directories.
I have found no connection between dired and flist, which use the same idea.
Here is a chronology for the earlier dired using the information from the saildart archive:
Stanley Kugel began writing a program called dired in 1974, as a student at Stanford. According to the documentation:
Dired is a "Directory Editor". It is operationally similar to E. It displays a list of the files in a given directory, and permits you to modify this display to modify the state of your files.
Later that year, the “E” program was modified to allow it to run the external dired “DRD” program, by adding its name to a table.
A couple of years later, the documentation for “E” was updated to list “DRD” as a keyword.
The following year, the documentation was updated to tell what “DRD” was, i.e., dired.
At the same time (1977-1978), several updates were made to dired, e.g., to make it usable by the rest of the SAIL community.
To summarize, the program was under development for a few years, but not published until late 1977. At that point, further changes were needed, and users provided feedback (and problem reports). About 20% of the 3300-line assembly-language program changed as a result. After Kugel left Stanford in 1978, development of this older dired stopped, although it was in use for some time. The older source code is unavailable (i.e., before the updates in late 1977), but the older documentation is available.
“E” is one editor; “EMACS” is another. At some point, within a year or so after its general use by the SAIL community, someone decided to add a similar feature to EMACS. In AI Memo 519 (mid-1979), Stallman mentioned this:
DIRED enables a user to edit his file directory. He is shown a listing of his directory, which he can move from one file to another with the usual cursor-motion commands, but other commands are provided to move, examine, compare and delete files. Command are also available to find files which appear to be deletable (for example, old versions of programs, and temporary files) and mark them, tentatively, to be deleted later. DIRED has been implemented mostly by users.
Stallman of course was familiar with E. On page 19, Stallman indicated that he started implementing the display processor in 1974 “inspired by the editor E of the Stanford Artificial Intelligence Lab”). In an appendix on pages 26-27, Stallman pointed out the deficiences of four other editors (including E). Ciccarelli's earlier paper gives more details on using dired, but provides no perspective. Dan Weinreb's blog quoted mail from November 1976 (shortly after “DRD” was mentioned in E's documentation) indicating that MM DIRED had recently been implemented in EMACS.
The early descriptions of MM DIRED in EMACS mention these features which were documented in dired:
There was no mention of MM DIRED sorting the list of files (dired allowed sorting alphabetically or by file-extension). Neither Gosling's nor Greenberg's descriptions of this feature mention file-sorting.
The third part of the story should begin in 1980, but there is no available source for that. Move on to 1982.
In mid-1982, the third implementation of dired was announced:
Message-ID: <bnews.sri-unix.1635> Newsgroups: net.sources Path: utzoo!decvax!cca!mclure@sri-unix X-Path: utzoo!decvax!cca!mclure@sri-unix From: mclure@sri-unix Date: Sun Jun 6 05:25:54 1982 Subject: dired directory editor Posted: Sun Jun 6 01:17:01 1982 Received: Sun Jun 6 05:25:54 1982 Here's a program called Dired that we've found useful for maintaining directories and files. It is less cumbersome and easier to use than vsh (visual shell) and seems better for quick sessions of pruning back directories. It runs on our v7 2.8 BSD system, and ran on virgin v7 before. There shouldn't be much which hardwires it to these versions however. It requires Berkeley's Termcap. Essentially, you 'edit' a directory listing similar to what ls(1) produces. The idea was taken from similar programs running on TOPS-20/Tenex/etc. Stuart Cracraft mclure@sri-unix ucbvax!menlo70!sri-unix!mclure
This happened to be a program with the same name, inspired by the earlier (similar) programs, but different:
Like the previous programs, files were marked for deletion at the end of a session. That was the only feature carried forward.
Greenberg went into some detail on the obscure things done to support terminals in SAIL (see the section The SUPDUP-OUTPUT ARPANET Protocol). None of that is relevant anymore, nor has it been since the 1980s.
Comments in the source-code indicate that Stuart Cracraft and Jay Lepreau began work on this program in 1980 and 1981, respectively.
Late in 1983, Charlie Hill announced an improved version. This was probably the version which I saw, and began improving. A little later, in 1984, Jay Lepreau incorporated more improvements from Charlie Hill, calling this “ded” (which Bill Paulsen pointed out to me).
I had not noticed, because I had moved to an Apollo and VMS environment a few weeks before. Subsequently, I developed a related program (flist) for VMS, and after that, began a new directory editor which I called “ded” (i.e., the same name, but different source code and different capabilities). When I moved to the Software Productivity Consortium in late 1987, I began again (while negotiating taking my tools), and reused the directory browser in when developing the current ded.
At the same time, some work was done with Lepreau's ded, as seen in the Sprite093 files. However, there is a gap between 1987 and my next sighting of this program about ten years later.
But even before that, there was a third newer dired, written by Michael J. Lijewski. Version 2.0 was presented at the beginning of October 1993. The archives for comp.sources.reviewed also show these versions:
This program was written in C++. Its manual page said
Dired is a directory editor modelled after Dired Mode in GNU Emacs.
One of the reviewers commented:
It also has the ability to change the ordering of the files (based on modified, changed or accessed time) something lacking in the standard emacs dired. However, when changing the ordering, a directory rescan has to be performed manually.
Few people noticed this posting. At least one of the
developers in Utah noticed. Nelson Beebe resumed development on
the Lepreau program, providing a 2.00
in mid-1995, continuing for another year to
2.03 before another developer became
interested. At the same time, I was (attempting to) work with the
ncurses developers to incorporate my
improvements. In the middle of that, I provided my source for
ded, as noted in an email reply:
That effort came to naught; I ended up as the ncurses developer. Because ded is mentioned in the ncurses release announcements, the Utah developers may have noticed this. Perhaps not:
Gustafson followed the 3.05 release with an article in Linux Gazette, saying
The directory navigator and program launcher called "DIRED" in the original incarnations of EMACS has two stand-alone Unix clones. Mike Lijewski's "dired" 2.2 is written in C++ (1996). The original "dired" was written in C by Stuart Cracraft (1980), available as version 3.05 (1997).
Historically, shortly after emacs "dired" appeared in the TECO implementation, a stand-alone version was written by Stuart Cracraft (1980). The emacs version and the C version have not kept up with one another.
Lijewski wrote "dired" in 1990, while at Cornell University Theory Center, without any knowledge of Cracraft's "dired". The Theory Center ran on IBM VM/CMS, under which there is a utility call "file manager". This program manages the flat VM/CMS file system and represents the main user interface into files. The creation of "dired" eased the transition from VM/CMS to Unix.
Lijewski's "dired" has the advantage of hindsight and C++ program development so it promises to be written in modern syntax and very maintainable. Cracraft's "dired" was rewritten in 1996 in ANSI C. It suffers with flaws in both design and readability, but the features are there.
However, Gustafson did not identfy a source of information for the timeframe in the sentence about TECO (3-4 years is not “shortly after” in any case). The comment about VM/CMS is questionable (he is referring to filelist, an XEDIT script which imitated flist). I have found no source for the 2.2 dired release. Perhaps that was via private email. Lijewski's earlier versions do not mention VM/CMS, discussing only his success in running it on a half-dozen BSD/BSD-compatible systems, but he did comment on this in a posting to comp.lang.c++ in September 1991 (before the first review). Lijewski's comments about C++ versus dired in any case indicate that he was not optimistic about its portability.
Each of those programs (from Lepreau, Lijewski, Beebe, Gustafson and even bzdired) is a termcap application (some mention curses in their documentation, such as Beebe's webpage about dired), but the programs use termcap calls). Given that, the program (rather than the library) is what determines how cursor-keys are recognized. Rather than using the terminal description, they rely upon program logic to recognize common cases. I did that in ded, but aside from test-compiles with SunOS 4 (i.e., BSD curses) in the 1990s, have not used that approach since 1994 (see cmdch.c).
Key bindings are a nuisance, but managing lists of files is the purpose of the directory editor. Emacs' dired mode handles that by allowing multiple dired buffers. The standalone programs other than ded do not do that. Depending on the program those either
In ded I manage all of the lists of files as a ring from which a shell command can refer to the preceding or succeeding list.
There is (by design) no single-keystroke command in ded for deleting files. Other programs do that. The original dired feature of marking files for deletion on exit is not used in later programs (even Emacs, since dired has been a major-mode for a long time rather than a subsystem). All that remains of dired's original purpose is in displaying a list of filenames on which some operation might be performed.
C REC PAGE DESCRIPTION C00001 00001 C00004 00002 Summary of suggestions, bugs, etc., from subsequent pages: C00008 00003 ∂11-Sep-78 1549 DON follow mr_entrants, multiple masks C00009 00004 ∂15-Sep-78 0224 RSP Typing ↑-chars on non-displays C00010 00005 ∂05-Oct-78 2310 RSP /OPT(#) nuisance re TMPCOR C00012 00006 ∂22-Oct-78 2212 ROD ARRAY no room C00014 00007 ∂21-Jan-79 0619 MRC ESC-I interrupts C00015 00008 ∂15-Mar-79 1825 RP PRUNEing with DIRED C00025 00009 ∂13-Apr-79 1024 DGL interdevice transfers C00027 00010 ∂19-Jun-79 1634 ME [*,*] C00029 00011 ∂14-Aug-79 0434 DON possible bug in interPPN renames C00035 00012 ∂21-Aug-79 1331 ME changing terminal types C00037 00013 ∂15-Oct-79 1230 BTH mail & send C00038 00014 ∂03-Feb-80 1300 MRC CLRBFI on errors? C00039 00015 ∂08-Apr-80 1725 ME window positioning on mask change C00047 00016 ∂03-Aug-82 1219 ME rename fails to zero dump word C00048 00017 ∂28-Jan-83 1728 PB output files on udp C00049 00018 ∂04-May-83 1452 ME /unsorted /=> /-tmpcor C00050 00019 ∂24-Nov-83 1524 JJW Continue after exit in file-display mode C00051 00020 ∂02-Jan-84 1711 ME dealing with Bad Retrieval C00052 00021 ∂07-Jul-84 1545 ARK COPY C00053 ENDMK
Lars Brinkhoff has identified a few other programs named “dired” and reported his findings in ITS #2083:
An assembly-language program written by P. David Lebling in 1972. This program is well-commented, allowing the reader to infer a difference between it and Kugel's program. The latter defers deletes until exiting dired (however, Eugene Ciccarelli's comment indicates that defering deletes was not in Kugel's original program). Lebling's program treats deletes like other commands, doing those within the directory editor.
Another SAIL program.