LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 03-30-2011, 09:51 AM   #1
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Rep: Reputation: 14
Another Ksh Command completion query


I'm running ksh on emacs mode, so that I can type <ESC><ESC> for filename completion and <ESC>= for a listing of files/directories.

However, command completion bash style does not seem to work.

e.g. if I type netst<ESC><ESC> nothing happens, whereas netst<TAB> on a bash shell (in linux) does complete to netstat

I've been searching google for a bit about this, but while there are loads of links talking about command completion for ksh, they are actually talking about filename/directory name completion, which is not quite the same.

I'm running on Solaris 10

Is command completion actually possible with korn shell?

TIA

edit:

command completion does work on my rhel6 box running ksh Version JM 93t+ 2010-06-21

I can't get the version in solaris, must be a different variable to KSH_VERSION or VERSION

Last edited by manyrootsofallevil; 03-30-2011 at 10:01 AM.
 
Old 03-30-2011, 03:11 PM   #2
toordog
Member
 
Registered: Jul 2010
Location: Montreal, Canada
Distribution: RedHat, Ubuntu, Solaris, AIX, BSD
Posts: 42

Rep: Reputation: 3
Have you check the man page of ksh? It's plentyful of interesting information.

In Korn Shell, you must bind your key in your profile rc. This is why Korn Shell is considered not user friendly but quite powerful. I ran in this problem under AIX back in time and I decide that I would use sh or csh instead of ksh as my shell but I would always code in Korn Shell. Back in time, I didn't review the manpage of ksh but I had to do it yesterday for something else and I figured that issue at the same time.

I would give a try if I were you

Not sure about the validity of this link, but get a look and let us know :

http://www.tek-tips.com/viewthread.cfm?qid=258309



Regards,
 
Old 03-30-2011, 06:44 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by manyrootsofallevil View Post
I'm running on Solaris 10

Is command completion actually possible with korn shell?
...
command completion does work on my rhel6 box running ksh Version JM 93t+ 2010-06-21

I can't get the version in solaris, must be a different variable to KSH_VERSION or VERSION
The ksh version provided with Solaris 10 and older is ksh88 (the same that is found in most if not all other commercial Unixes). That version doesn't implement command completion and never will.

OpenSolaris / Solaris 11 Express is bundling ksh93t+ which has its feature.

If you need to stay with Solaris 10, you choices are either to build ksh93 from the source code, find an already built binary, or perhaps just use /usr/dt/bin/dtksh which is based on an quite older ksh93 release but nevertheless implements command completion.

Last edited by jlliagre; 03-30-2011 at 06:45 PM.
 
1 members found this post helpful.
Old 03-31-2011, 03:26 AM   #4
manyrootsofallevil
Member
 
Registered: Dec 2010
Distribution: Red Hat, Kubuntu
Posts: 130

Original Poster
Rep: Reputation: 14
Quote:
Originally Posted by jlliagre View Post
The ksh version provided with Solaris 10 and older is ksh88 (the same that is found in most if not all other commercial Unixes). That version doesn't implement command completion and never will.

OpenSolaris / Solaris 11 Express is bundling ksh93t+ which has its feature.

If you need to stay with Solaris 10, you choices are either to build ksh93 from the source code, find an already built binary, or perhaps just use /usr/dt/bin/dtksh which is based on an quite older ksh93 release but nevertheless implements command completion.
I changed the shell to dtksh and lo and behold, command completion works.

thanks

I also found the shell version Version M-11/16/88i, which confirms your statement above (not that I was doubting you or anything )
 
  


Reply



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
tab completion in command line interface linuxgentoo Programming 4 08-29-2008 12:35 AM
ksh command completion rwalders Linux - Newbie 4 11-01-2007 06:51 PM
Ksh : Command not found aashish_us2002 Linux - Software 15 03-13-2006 04:26 AM
enabling command option completion s_deepblue Debian 4 12-02-2005 05:42 PM
The ksh command Gins Linux - General 10 11-20-2004 06:56 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:14 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