Topic: ksh93: How to enable tab completion?

Does one have to `enable' tab completion in ksh93 or should it `just work'?

Re: ksh93: How to enable tab completion?

Hrrm, depends which O/S IIRC.  NetBSD-1.x didn't have it, 2.x did.

See my ksh page at

http://home.nyc.rr.com/computertaijutsu/ksh.html

You ~might~ have to set something in .kshrc   (I forget which ksh I was using at the time, might have been pdksh)

<@andre> i would be so much more efficient if i wasn't so stupid

Re: ksh93: How to enable tab completion?

pdksh is the default ksh included with NetBSD

if you want ksh93 - try /usr/pkgsrc/shells/ast-ksh

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: ksh93: How to enable tab completion?

Tab completion is turned on by default in ksh93. pdksh requires some lines in .profile.

For pdksh tab completion

bind ^i=complete
bind ^i=complete-list

and if you want arrow key history scrolling

set -o emacs # set emacs mode
alias __A="^P" # arrow key for the previous command
alias __B="^N" # arrow key for the next command
alias __C="^F" # arrow key for one character forwards
alias __D="^B" # arrow key for one character backwards
... and then they said "I bet you can't make MINIX kernel panic!!!" And that's when I got mad

Re: ksh93: How to enable tab completion?

set -o emacs
set -o vi-tabcomplete
bind ^I=complete-list


Thats what I use.

Keep Smiling

Re: ksh93: How to enable tab completion?

Found a way to do it:

set -o vi
set -i viraw

It allows for vi style editing of the command line, which I don't mind.

My only beef with ksh93 is that when I login with xterm, it doesn't run ~/.profile (so therefore I don't get my custom prompt).

Re: ksh93: How to enable tab completion?

Russell wrote:

Found a way to do it:

set -o vi
set -i viraw

It allows for vi style editing of the command line, which I don't mind.

My only beef with ksh93 is that when I login with xterm, it doesn't run ~/.profile (so therefore I don't get my custom prompt).

'xterm -ls' works for me

| There's no place like /home | There's no place like /home | There's no place like /home |

Re: ksh93: How to enable tab completion?

Russell wrote:

My only beef with ksh93 is that when I login with xterm, it doesn't run ~/.profile (so therefore I don't get my custom prompt).

"xterm -ls" or set the "loginShell" resource. Both methods makes it a login shell which means that it'll read your ~/.login or ~/.profile.

Good luck and be well.

Re: ksh93: How to enable tab completion?

Arh... thanks. smile

Re: ksh93: How to enable tab completion?

using Mutt on a vtty with ksh93 doesn't work well. I can't quit the program. Anyone else had this problem?

Re: ksh93: How to enable tab completion?

I had all sorts of weird problems with ksh93.  For example, I'd start a line and if
>it went more th
>an a few characters, it would look like this.  smile

Switching to pdksh helped, but in the end, I went back to bash and zsh.

<@andre> i would be so much more efficient if i wasn't so stupid

Re: ksh93: How to enable tab completion?

Well, it's good to know it isn't just me. I'm switching back to /bin/sh.

Re: ksh93: How to enable tab completion?

You might try pdksh.  There is always bash as well,  One gets used to tab completion and history with the arrow keys, which is why I don't use sh as my shell.

Then, there is zsh, which many of us use.

<@andre> i would be so much more efficient if i wasn't so stupid

Re: ksh93: How to enable tab completion?

pdksh isn't doing tab completion, despite adding this to my ~/.profile:

bind ^i=complete
bind ^i=complete-list
set -o emacs # set emacs mode
alias __A="^P" # arrow key for the previous command
alias __B="^N" # arrow key for the next command
alias __C="^F" # arrow key for one character forwards
alias __D="^B" # arrow key for one character backwards

the man page says it should read ~/.profile.

ideas?

thanks!

Re: ksh93: How to enable tab completion?

Hi Lucas.
No Ideas on what you have given in your post. I do not know about to enabling the tab completion. I feel it would be better to find the solution with help of expert programmer of the language.
Thanks.

Re: ksh93: How to enable tab completion?

oh. when i was testing my .profile, i think i was running `ksh`, not `ksh -l`. dumb larz

"set -o vi-tabcomplete" certainly works well.

Re: ksh93: How to enable tab completion?

i hate you.