LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2007, 07:57 PM   #1
rwalders
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Rep: Reputation: 0
ksh command completion


I just started using a Linux workstation and noticed that the command line completion operation doesn't work with I enter the key stroke "esc esc". I'm using ksh shell with the variables EDITOR = vi and VISUAL = vi.

I logged onto our HP UNIX workstation and the key stroke "esc esc" completes the command but it doesn't on the LINUX workstation. Is there something else I need to set.

Roger
 
Old 10-31-2007, 09:35 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
in ksh, use esc \ -- escape key followed by the reverse back slash, for completion of file names. hmm, just looked back and you said completion of command lines. I played with the esc esc and it doesn't do anything. So, I'm not totally clear on what you were expecting.

I have in my .profile

ENV=$HOME/.kshrc
export ENV

and in my .kshrc

set -o vi

The `set -o vi` is so that the esc gets me into vi mode, then h j k l navigate left down up right through previous commands and I can edit them using vi keystrokes. Return submits the command.

Don't know if this helps or not. Hope so.
 
Old 11-01-2007, 12:48 AM   #3
rwalders
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Erdos 4

I also have the command: set -o vi in my .profile file.

I have access to a HP UNIX workstation and a Linux workstation both machines are running ksh. The command line completion works differently on the two machines. For example when I type on the HP UNIX machine:
cd /pro followed by pressing the esc key twice
the command is completed to be:
cd /proj/

On the Linus machine when I type the same thing:
cd /pro followed by pressing the esc key twice nothing happens.

Roger
 
Old 11-01-2007, 05:19 PM   #4
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
ah, so you are talking about filename completion.

type `cd /pro` followed by esc-\, the escape key followed by the reverse backslash,

and you will get `cd /proj/`

I haven't used HP/UX, but it sounds like they are the odd ones out. BSD and Solaris both do it the way I describe. I don't have a linux box sitting right here at the moment, but I would try it and see.
 
Old 11-01-2007, 06:51 PM   #5
rwalders
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Erdos 4

esc\ works thanks.

Roger
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ksh : Command not found aashish_us2002 Linux - Software 15 03-13-2006 04:26 AM
Command line tab completion reboots Suse 9.3 lmckinney SUSE / openSUSE 2 01-16-2006 04:29 AM
enabling command option completion s_deepblue Debian 4 12-02-2005 05:42 PM
The command ksh doesn't work Gins Linux - General 18 12-10-2004 12:57 AM
The ksh command Gins Linux - General 10 11-20-2004 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration