HELP: Command-line editing with ksh/csh

HELP: Command-line editing with ksh/csh

Post by Chris Hufnag » Sat, 29 Aug 1992 16:19:04



Hi, I am running Amiga Unix v2.1 and unfortunatly, the included ksh/csh
don't seem include command-line editing capabilities.  When I use
the cursor keys or an ESC(J,K) combination I only get "[[A, [[B, [[C, [[D)"
etc.  Am I forgetting to set something or is there a patch,utility that
gives me back the sacred command-line editing abilityies?

Thanks for any info.
--

                                     | pillow tonight,the nerve-ending fairy will
                                     | come and take them away! And she'll leave
                                     | you hundred dollar bills!" -Stimpy

 
 
 

HELP: Command-line editing with ksh/csh

Post by Mark C. Burha » Sat, 12 Sep 1992 02:09:25


|> Hi, I am running Amiga Unix v2.1 and unfortunatly, the included ksh/csh
|> don't seem include command-line editing capabilities.  When I use
|> the cursor keys or an ESC(J,K) combination I only get "[[A, [[B, [[C, [[D)"
|> etc.  Am I forgetting to set something or is there a patch,utility that
|> gives me back the sacred command-line editing abilityies?

Don't know how to get the arrow keys to work as command recall...yet...
but with ksh you can try:
set -o emacs
   or
set -o vi

With 'set -o emacs':
   ^P   Previous command
   ^N   Next command
   ^B   Back up a character
   ^F   Move forward a charcer
   ^D   Delete character
   ^K   Erase from cursor to end of line

With 'set -o vi':
 --First the ESC key must be pressed--
    k   Previous command
    j   Next command
    h   Back up a character
    l   Move forward a character
    x   Delete character
    D   Erase from cursor to end of line
--

SAS Institute, Inc., USA, SAS Campus Drive, Cary, NC 27513.
"If you want a resume, I'll put it in writing.  It's only good for a day
and the contents are frightening."  -- Lyrics by Harry Connick, Jr.

 
 
 

HELP: Command-line editing with ksh/csh

Post by Phil Abercromb » Sat, 12 Sep 1992 19:12:30




|> Hi, I am running Amiga Unix v2.1 and unfortunatly, the included ksh/csh
|> don't seem include command-line editing capabilities.  When I use
|> the cursor keys or an ESC(J,K) combination I only get "[[A, [[B, [[C, [[D)"
|> etc.  Am I forgetting to set something or is there a patch,utility that
|> gives me back the sacred command-line editing abilityies?

*> Don't know how to get the arrow keys to work as command recall...yet...

*> but with ksh you can try:
*> set -o emacs
*>    ^P   Previous command
*>    ^N   Next command
*>    ^B   Back up a character
*>    ^F   Move forward a charcer
*>    ^D   Delete character
*>    ^K   Erase from cursor to end of line

With emacs mode (and recent revisions of ksh), you can set shell
aliases to interpret the escape codes generated by your arrow keys.

alias __A=" " # recall previous line
alias __B=" " # goto next line
alias __D=" " # go back in a line
alias __C=" " # go forward in a line

(I can't find this in my FM though...)
--
Phil Abercrombie       | Living in another country |    _~o _O   | BIKE TO

                       |                           | (*)/===/(*) |  

 
 
 

HELP: Command-line editing with ksh/csh

Post by Mark C. Burha » Thu, 24 Sep 1992 04:50:53



|>


|>
|> *> Don't know how to get the arrow keys to work as command recall...yet...
|>
|> *> but with ksh you can try:
|> *> set -o emacs
|> *>    ^P   Previous command
|> *>    ^N   Next command
|> *>    ^B   Back up a character
|> *>    ^F   Move forward a charcer
|>
|> With emacs mode (and recent revisions of ksh), you can set shell
|> aliases to interpret the escape codes generated by your arrow keys.
|>
|> alias __A=""    # recall previous line
|> alias __B=""    # goto next line
|> alias __D=""    # go back in a line
|> alias __C=""    # go forward in a line

Excellent!!

|> (I can't find this in my FM though...)

Did ya expect to?  :->

--

SAS Institute, Inc., USA, SAS Campus Drive, Cary, NC 27513.
"I am not afraid to start this journey again tomorrow." -- Basia

 
 
 

1. ksh -o emacs and command-line editing problem

My gut tells me that the following is a known ksh problem.

Occasionally while I am performing command line edits using the emacs
bindings, entering a control char to position the cursor results in the
control char being echoed to the command line. It's as if the shell gets
confused about whether it's in raw or cooked mode.

Are there any work-arounds to eliminate this problem? Suggestions?

System: Solaris 2.6
term: vt100, vt220

...and for what it's worth, MKS's NT port of ksh seems to have included
this problem/bug.

Thanks!

    --Eric

Sent via Deja.com http://www.deja.com/
Before you buy.

2. FTP - need non-PASV mode

3. Is command line editing in csh possible?

4. Online Backup hsmdump vs ufsdump and lockfs

5. command line editing in csh

6. XFree86 woes on HP Vectra

7. Aliases for csh command line editing

8. wizards for Linux

9. Using ksh command line edit as Superuser in Solaris

10. ksh Filename Completion using vi command line editing mode?

11. ksh:edit command line

12. Ksh: Command line editing with arrow keys?

13. How to config ksh to doskey command line editing?