View Single Post
  #1   (View Single Post)  
Old 31st August 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default how to enable file/command completion for ksh93?

Does anyone know how to enable completion for filenames (and if possible commands/programs) in ksh93 ?


Under pdksh based stuff (I don't have ksh88 anywhere so I can't check), the usual procedure that I use works fine:

Code:
          set -o emacs
          bind "^I=complete"
          bind "^I=complete-command"
          bind "^I=complete-file"
Which are a mixture of Scottro's ksh page and "playful" looking around obsd$ bind | $PAGER for the sake of completeness. But when using the shells/ksh93 port on FreeBSD, I was a tad shocked when ksh93 didn't understand the bind:

Code:
Terry@dixie$ ENV=~/.{$USER}_shrc                                           7:46
Terry@dixie$ SHELL=`which ksh93`                                           7:46
Terry@dixie$ ksh93 -l                                                      7:47
/usr/home/Terry/.Terry_shrc[72]: bind: not found [No such file or directory]
/usr/home/Terry/.Terry_shrc[73]: bind: not found [No such file or directory]
/usr/home/Terry/.Terry_shrc[74]: bind: not found [No such file or directory]
alias: gcc -Wall -Wpointer-arith -Wcast-qual -Wcast-align \
                   -Wconversion -Waggregate-return -Wstrict-prototypes \
                   -Wmissing-prototypes -Wmissing-declarations \
                   -Wredundant-decls -Winline -Wnested-externs -std=c99 \
                   -march=i686 -pipe: invalid alias name
There is more simplicity in a man who eats caviar on impulse than in a
man who eats Grapenuts on principle.
                -- G. K. Chesterton


To days date is: Sun Aug 31 07:47:05 UTC 2008
Terry@dixie-$
The bind command not being found (of course) are from the aforementioned bind commands for '^complete.*' directives in my $ENV file. I didn't see completion in the manual page for ksh93 and the 'esc esc' mentioned in the FAQ doesn't work/help. The manual page is fairly large and generally well done, so I reckon I could've missed it, but I don't think so. Any one hit this before, and solved it?
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote