From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18396 invoked from network); 11 Dec 1999 17:03:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Dec 1999 17:03:30 -0000 Received: (qmail 24444 invoked by alias); 11 Dec 1999 17:03:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8999 Received: (qmail 24436 invoked from network); 11 Dec 1999 17:03:17 -0000 Date: Sat, 11 Dec 1999 09:03:10 -0800 (PST) From: Bart Schaefer To: zsh-workers@sunsite.auc.dk Subject: Re: filecompletion in ksh93 (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 This is interesting; I haven't seen a recent ksh manual. Looks like ksh can do "widgets" too, after a fashion. Use of "trap" on a magic KEYBD signal to invoke the function is kinda cutesy. ---------- Forwarded message ---------- Date: 11 Dec 1999 09:33:05 -0500 From: Gabor Newsgroups: comp.unix.shell Subject: Re: filecompletion in ksh93 In comp.unix.shell, Dave Brown wrote: # In article <82s1s9$cn5$1@avon.europe.sco.com>, # Ajay Matai wrote: # : How to make tab work as filename completion in ksh? # # You can't. You have to type awkward, nonintuitive characters Wrong. You can. There might be better solutions than mine here. This one works in vi mode, and the next one in emacs. function vi_tab { # what looks like a space on the next line is a physical tab if [[ ${.sh.edmode} == "" && ${.sh.edchar} == " " ]] then .sh.edchar="\\" elif [[ ${.sh.edmode} != "" && ${.sh.edchar} == "=" ]] then .sh.edchar="=a" fi } trap 'vi_tab' KEYBD function emacs_tab { # what looks like a space on the next line is a physical tab if [[ ${.sh.edchar} == " " ]] then .sh.edchar="" fi }