ksh: 2 Q's, command completion & command history?

ksh: 2 Q's, command completion & command history?

Post by Zora » Mon, 20 Jan 1997 04:00:00



Hi all,

Command completion in ksh is done with Esc Esc (hitting the escape key
twice). Although I've never been successful at getting this to work on
my system at work (AIX 3.2.5), I read that's the key sequence for
command/path completion.

My question is, can that be changed to the Tab key and if so how, in
ksh? Command completion in tcsh and bash use the Tab key. The Tab key is
SO MUCH MORE convenient a key for command completion.

Another question... about previous command retrieval. bash and tcsh use
the UP and DOWN arrow keys for command retrieval. ksh uses Esc-k & Esc-j
respectively. UP & DOWN are MUCH BETTER choices. Can this be changed in
ksh and how?

Any guidance would be appreciated. I like the ksh for it's better (I
think so) scripting/programming features but the way it implements
command/path completion and previous command retrieval is really
annoying me. So much time can be saved with the use of Tab and UP,DOWN
keys.

Thanks, Zoran.

 
 
 

ksh: 2 Q's, command completion & command history?

Post by Coburn Watso » Mon, 20 Jan 1997 04:00:00



> Hi all,

> Command completion in ksh is done with Esc Esc (hitting the escape key
> twice). Although I've never been successful at getting this to work on
> my system at work (AIX 3.2.5), I read that's the key sequence for
> command/path completion.

> My question is, can that be changed to the Tab key and if so how, in
> ksh? Command completion in tcsh and bash use the Tab key. The Tab key is
> SO MUCH MORE convenient a key for command completion.

> Another question... about previous command retrieval. bash and tcsh use
> the UP and DOWN arrow keys for command retrieval. ksh uses Esc-k & Esc-j
> respectively. UP & DOWN are MUCH BETTER choices. Can this be changed in
> ksh and how?

> Any guidance would be appreciated. I like the ksh for it's better (I
> think so) scripting/programming features but the way it implements
> command/path completion and previous command retrieval is really
> annoying me. So much time can be saved with the use of Tab and UP,DOWN
> keys.

> Thanks, Zoran.

I'm relatively new to ksh, but for command\pathname-completion I use "Esc
\".  Of course I operate with "set -o vi".

Coburn Watson
Information Systems Support - Research
Scios, Inc.


 
 
 

ksh: 2 Q's, command completion & command history?

Post by J.J. Keijs » Tue, 21 Jan 1997 04:00:00



>Hi all,

>Command completion in ksh is done with Esc Esc

Can't change that, I'm afraid; the newer Korn shell 93 (which I have not seen
on AIX yet, not even on AIX 4.2) supports it

Quote:>Another question... about previous command retrieval. bash and tcsh use
>the UP and DOWN arrow keys for command retrieval. ksh uses Esc-k & Esc-j
>respectively. UP & DOWN are MUCH BETTER choices. Can this be changed in
>ksh and how?

try this on X terminals:
  set -o emacs
  alias __A=^P ; up
  alias __B=^N ; down
  alias __C=^F ; right
  alias __D=^B ; left
  alias __H=^A ; home
or on a console, try:
  set -o emacs
  alias _A=^P ; up
  alias _B=^N ; down
  alias _C=^F ; right
  alias _D=^B ; left
  alias _H=^A ; home

(actually, I have something like
  if [ "$TERM" = "aixterm" -o "$TERM" = "xterm" ]
  then
      alias __A=....
  else
      alias _A=.....
  fi
)

where ^P is Control-P (use '\' in the shell itself, use ^V-^P in vi)

that should do it. I also have control-arrow keys, home, end, the lot, but you
may need to mess with your Xresources a bit for that (provided you're running
X, of course)

HTH,

JJ

----------------------------------------------------------
                 *NOTE*
   My Email return address is not correct
    in order to avoid mass mailings...
     These are the correct addresses:

  Jan Just (JJ) Keijser

  X400: C=NL A=400NET P=SHELL O=SIEP RIJSWIJK
        OU1=EPT-RO OU2=OPENMAIL S=KEIJSER I=JJ
          or

  X400: C=GB A=ATTMAIL P=Logica O=LBV OU1=LBVRTDA S=KEIJSERJJ

  (who said X400 addresses aren't easy to remember :-)

  Where do you want to crash today?
  My views are my own...
                    flames > /dev/null 2>&1
----------------------------------------------------------

 
 
 

1. filename completion & history in ksh ?

Hello dear Shell Gurus,

        I've recently moved from
a tcsh env. to a ksh one, and I should
like to know how to perform some simple
things like:

        - having the filename completion
when using the Esc or Tab key
        - Accessing the history using the arrow
keys.

        Thanks in advance.

Best Regards,

Philippe

2. problem with networking

3. filename completion via tab, command history via cursor keys etc.

4. Enlightenment Window Manager

5. tab completion and command line history

6. pppoed and FTP Timeouts

7. Command completion for Korn Shell command line

8. email

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

10. command completion like bash under ksh

11. command completion in ksh ?

12. command line completion in ksh

13. command completion in ksh