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