home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2024 / README < prev    next >
Encoding:
Text File  |  1990-12-28  |  2.6 KB  |  77 lines

  1. pmlined 1.5, 11/4/90.
  2. Placed into the public domain by Daniel J. Bernstein.
  3. Comments to him at brnstnd@nyu.edu.
  4.  
  5.  
  6. This is pmlined, the poor man's line discipline.
  7.  
  8. pmlined provides a tty editing mode that should make former IBM users
  9. feel right at home. You edit the current line on the status line
  10. (through stderr). Long lines scroll horizontally. When you press return,
  11. pmlined sends the line to stdout. All the usual editing characters,
  12. including ^U, ^W, backspace, delete, and ^V, work normally. ^A switches
  13. between this editing mode and the usual tty mode. In this version, you
  14. also get ^H and ^L to move the cursor back and forth within the line,
  15. and a 20-line editable history with ^B and ^F.
  16.  
  17. Of course, pmlined is also the smallest line discipline implementation
  18. known to man.
  19.  
  20. Other than that, it's pretty poor. This version is just a prototype. It
  21. could be made much more efficient; there are a lot of features missing.
  22. Feel free to play with it, though. The code is short and (I hope) easy
  23. to understand.
  24.  
  25. pmlined was originally called botwana. It was not named after a small
  26. African country rumored to manufacture clone IBM 3270 terminals.
  27.  
  28.  
  29. Requirements:
  30.  
  31.   A termcap entry with ``ts'', ``fs'', and ``ce''. Enclosed is a generic
  32.   VT termcap supporting the status line; you may have to rewrite your
  33.   termcap entry analogously. In this version, the entry must also have
  34.   ``us'' and ``ue'' for the cursor.
  35.  
  36.   The pty program, for use as described below.
  37.  
  38.  
  39. To use pmlined, type the following:
  40.  
  41.   pmlined | pty $SHELL
  42.  
  43. It should feel just like a normal shell, except that you edit lines on
  44. the bottom of your screen before entering them. If you really are an IBM
  45. programmer, you might feel more comfortable with a shell prompt of R;
  46. followed by a newline. You may want to % alias ibm 'pmlined | pty'.
  47.  
  48. A different use of pmlined is to make clean typescripts. If you have the
  49. script clone in the pty package,
  50.  
  51.   pmlined | script
  52.  
  53. will let you correct editing errors before they enter the script.
  54.   
  55.  
  56. Caveats:
  57.  
  58.   You have to type something after the final ^D, or pmlined will not
  59.   realize that the output has ended.
  60.  
  61.   pmlined does not react automatically to changes in the tty mode. When
  62.   you run vi, for instance, you have to remember to type ^A to use
  63.   character-at-a-time mode. A somewhat less pure design could deal with
  64.   this automatically.
  65.  
  66.   pmlined doesn't understand tabs.
  67.  
  68.   pmlined's key bindings are hardwired.
  69.  
  70.   pmlined doesn't have macros, or help, or variables, or file
  71.   completion, or signal characters, or anything else you'd expect out of
  72.   a fancy line discipline. But it's easy to extend. (The first version
  73.   didn't have a command history.)
  74.  
  75.  
  76. Good luck!
  77.