home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / amiga / 2090 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  1.5 KB

  1. Path: sparky!uunet!sun-barr!news2me.ebay.sun.com!cronkite.Central.Sun.COM!texsun!netdev!mic!lerami!amix!janc
  2. From: janc@amix.commodore.com (Jan Carlson)
  3. Newsgroups: comp.unix.amiga
  4. Subject: Re: Broken term? sag?
  5. Message-ID: <1992Sep5.164342.8224@amix.commodore.com>
  6. Date: 5 Sep 92 16:43:42 GMT
  7. References: <1992Aug28.192133.15423@kbsw1> <1992Aug31.222806.8131@ckctpa.UUCP> <179@gimlet.herndon.va.us>
  8. Distribution: usa
  9. Organization: Amiga UNIX Software Development
  10. Lines: 29
  11.  
  12. In article <179@gimlet.herndon.va.us> logan@gimlet.herndon.va.us (Jim Logan) writes:
  13. >In article <1992Aug31.222806.8131@ckctpa.UUCP> crash%ckctpa@tct.com
  14. >(Frank "Crash" Edwards) writes:
  15. ># Errr, it should be pointed out that KSH does not "use" the editor.
  16. ># KSH has built-in emulations for EMACS and VI _only_.  Don't expect to
  17. ># be able to use wordstunt^H^H^Har keystrokes, or any other arbitrary editor.
  18. >
  19. >Under certain conditions it does.  In the "vi" command-mode you
  20. >can press 'v' and it will invoke the real thing.  I think 'v' is
  21. >mapped to "fc -e".  
  22. >
  23. >            -Jim
  24.  
  25. If a ksh user has FCEDIT exported with the path of any editor, he can
  26. type "fc abc" to pop the last command from his command history
  27. starting with "abc" into your editor, be it emacs, vi, mg, word*tar,
  28. ve, etc.  When you do a save and exit from the editor, ksh will
  29. execute the edited version of the command.
  30.  
  31. This is really handy for editing for and while loops, etc.
  32.  
  33. Try this:
  34.     FCEDIT=mg export FCEDIT
  35.     for f in a b c
  36.     do
  37.       echo $f
  38.     done
  39.     ls
  40.     fc for
  41.