home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3910 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.9 KB  |  48 lines

  1. Path: sparky!uunet!mdcbbs!apphpp10!abercrombie
  2. Newsgroups: comp.unix.shell
  3. Subject: Re: HELP: Command-line editing with ksh/csh
  4. Message-ID: <ABERCROMBIE.92Sep11102002@apphpp10.mdcbbs.com>
  5. From: abercrombie@mdcbbs.com (Phil Abercrombie)
  6. Date: 11 Sep 92 10:12:30 PDT
  7. Reply-To: abercrombie@mdcbbs.com
  8. References: <Bton03.99n@agora.rain.com> <BuDGzq.5pA@unx.sas.com>
  9. Organization: M&E (Division of EDS), Cypress CA
  10. Nntp-Posting-Host: 134.244.17.169
  11. In-reply-to: sasmob@chewy.unx.sas.com's message of Thu, 10 Sep 1992 17:09:25 GMT
  12. Lines: 34
  13.  
  14.  
  15. On Thu, 10 Sep 1992 17:09:25 GMT, sasmob@chewy.unx.sas.com (Mark C. Burhans) said:
  16. *> In article <Bton03.99n@agora.rain.com>, chuff@agora.rain.com (Chris Hufnagel) writes:
  17.  
  18. |> Hi, I am running Amiga Unix v2.1 and unfortunatly, the included ksh/csh
  19. |> don't seem include command-line editing capabilities.  When I use
  20. |> the cursor keys or an ESC(J,K) combination I only get "[[A, [[B, [[C, [[D)"
  21. |> etc.  Am I forgetting to set something or is there a patch,utility that
  22. |> gives me back the sacred command-line editing abilityies?
  23.  
  24. *> Don't know how to get the arrow keys to work as command recall...yet...
  25.  
  26. *> but with ksh you can try:
  27. *> set -o emacs
  28. *>    ^P   Previous command
  29. *>    ^N   Next command
  30. *>    ^B   Back up a character
  31. *>    ^F   Move forward a charcer
  32. *>    ^D   Delete character
  33. *>    ^K   Erase from cursor to end of line
  34.  
  35. With emacs mode (and recent revisions of ksh), you can set shell
  36. aliases to interpret the escape codes generated by your arrow keys.
  37.  
  38. alias __A=""    # recall previous line
  39. alias __B=""    # goto next line
  40. alias __D=""    # go back in a line
  41. alias __C=""    # go forward in a line
  42.  
  43. (I can't find this in my FM though...)
  44. --
  45. Phil Abercrombie       | Living in another country |    _~o _O   | BIKE TO
  46. abercrombie@mdcbbs.com | Under another name        |   -\<,-\<,  | WORK   
  47.                        |                           | (*)/===/(*) |  
  48.