home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / question / 14926 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  3.7 KB

  1. Xref: sparky comp.unix.questions:14926 comp.unix.aix:12812
  2. Newsgroups: comp.unix.questions,comp.unix.aix
  3. Path: sparky!uunet!cs.utexas.edu!torn!newshost.uwo.ca!uwovax.uwo.ca!brent
  4. From: brent@uwovax.uwo.ca (Brent Sterner)
  5. Subject: Re: AIX, ksh, and <esc> sequence line editing (partial progress)
  6. Organization: University of Western Ont, London
  7. Date: Wed, 23 Dec 1992 16:42:04 GMT
  8. Message-ID: <1992Dec23.124204.1@uwovax.uwo.ca>
  9. References: <1992Dec22.153435.1@uwovax.uwo.ca>
  10. Sender: news@julian.uwo.ca (USENET News System)
  11. Nntp-Posting-Host: hydra.uwo.ca
  12. Lines: 69
  13.  
  14.    Hi all.  I have a *partial* answer to my earlier query:
  15.  
  16. In article <1992Dec22.153435.1@uwovax.uwo.ca>, brent@uwovax.uwo.ca (Brent Sterner) writes:
  17. >    Hi there.  I'm a beginner at managing an aix system, using ksh as my
  18. > base for learning this platform.  Other systems I have access to (including
  19. > several unix (tcsh-based) systems and VMS) provide a mode of line editing
  20. > in which certain escape sequences map into command recall or cursor movement
  21. > within a recalled command line.  ksh doesn't seem to let me do this, from
  22. > what I've located in the manuals.  (Have I missed something?)
  23. >    Specifically, I'd like  <esc>[A   <esc>[B   <esc>[C   and   <esc>[D  to
  24. > perform the equivalent of "emacs" style line editing <ctrl-P>, <ctrl-N>,
  25. > <ctrl-F>, and <ctrl-B> respectively.  (I'm using an X-station successfully
  26. > at the moment to get at all those other systems; modifying the character
  27. > mapping for my station is not very attractive to me.  Obviously I'd prefer
  28. > to do this at the RS/6000 end.)
  29.  
  30.    I have had some email exchange with Rob van Manen (thanks Rob) in which
  31.    he indicates that he has done it (yay), but for some reason I cannot
  32.    replicate it (boo).  In summary:
  33.  
  34. On Wed, 23 Dec 92 14:54:47 +0100, manen@prl.philips.nl (Rob van Manen) said:
  35. >
  36. >Add the next few lines to the ksh (the one ENV points to)
  37. >
  38. >set -o emacs
  39. >
  40. >alias __A="^P"        # recall previous line
  41. >alias __B="^N"        # goto next line
  42. >alias __D="^B"        # go back in a line
  43. >alias __C="^F"        # go forward in a line
  44. >
  45. >The characters ^P, ^N, ^B and ^F have to be the control characters.
  46.  
  47.    I did not know how to do this.  So Rob sent me the following:
  48.  
  49. >table
  50. > !"#$%&'()*+,-./0123456789:;<=>?
  51. >@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  52. >begin 644 .aliases
  53. >M<V5T("UO(&5M86-S"@IA;&EA<R!?7T$](A B(" @(" @(" C(')E8V%L;"!Pz
  54. >M<F5V:6]U<R!L:6YE"F%L:6%S(%]?0CTB#B(@(" @(" @(",@9V]T;R!N97ATy
  55. >M(&QI;F4*86QI87,@7U]$/2("(B @(" @(" @(R!G;R!B86-K(&EN(&$@;&ENx
  56. >M90IA;&EA<R!?7T,](@8B(" @(" @(" C(&=O(&9O<G=A<F0@:6X@82!L:6YEw
  57. >!"@IAv
  58. > u
  59. >end
  60.  
  61.    This decodes into the required .alias file.  Now when I login, all my
  62.    cursor keys echo  ^@  (instead of simply beeping at me).  It seems we
  63.    are making progress, but we've stalled at this point.  Rob indicates
  64.    that ^V echoes the ksh version.  He sees: 'Version 11/16/88', while
  65.    I see 'Version 11/16/88d SBCS'.  I don't know the significance of the
  66.    difference.
  67.  
  68.    Rob and I have agreed to ponder this over the holidays.  This post is
  69.    public thanks to Rob as well as hoping this will help someone else on
  70.    the net figure out what I'm missing.
  71.  
  72.    If you can help, please send me email.  (I'll be gone for 10 days +/-,
  73.    and I'd hate to have a perfectly good answer vanish from our news tree
  74.    while I wasn't around to see it.)  Thanks to everyone else who tried to
  75.    help me out, and happy holidays to all.  b.
  76. --
  77. Brent Sterner   AIX System Manager Apprentice
  78. Fast:           <brent@hazzard.engga.uwo.ca>
  79. Telephone:      (519)661-2151 x 6036            Fax:    (519)661-3486
  80. Slow:   Computing & Communications Services, Natural Sciences Building
  81.         The University of Western Ontario, London, Ontario, Canada  N6A 5B7
  82.