LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Another Ksh Command completion query (https://www.linuxquestions.org/questions/solaris-opensolaris-20/another-ksh-command-completion-query-871924/)

manyrootsofallevil 03-30-2011 09:51 AM

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

toordog 03-30-2011 03:11 PM

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,

jlliagre 03-30-2011 06:44 PM

Quote:

Originally Posted by manyrootsofallevil (Post 4308536)
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.

manyrootsofallevil 03-31-2011 03:26 AM

Quote:

Originally Posted by jlliagre (Post 4309023)
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 :D)


All times are GMT -5. The time now is 01:37 AM.