From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12178 invoked from network); 19 Dec 1999 01:41:35 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Dec 1999 01:41:35 -0000 Received: (qmail 19138 invoked by alias); 19 Dec 1999 01:41:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9111 Received: (qmail 19129 invoked from network); 19 Dec 1999 01:41:24 -0000 Date: Sat, 18 Dec 1999 20:41:15 -0500 From: Gabor To: Bart Schaefer Cc: zsh-workers@sunsite.auc.dk Subject: Re: filecompletion in ksh93 (fwd) Message-ID: <19991218204115.A19493@vmunix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Mailer: Mutt 1.0i In-Reply-To: ; from schaefer@zanshin.com on Sat, Dec 11, 1999 at 09:03:10AM -0800 X-Operating-System: FreeBSD 2.2.7-STABLE i386 On Sat, Dec 11, 1999 at 09:03:10AM -0800, Bart Schaefer wrote: # 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. I am surprised more people don't know about this. It was one of the first nifty things I learned in ksh93. :) But what's the best is that people make statements about things which they know nothing about. Like that it cannot be done, even though they don't use ksh93. I love that. # ---------- Forwarded message ---------- # Date: 11 Dec 1999 09:33:05 -0500 # From: Gabor # Newsgroups: comp.unix.shell # Subject: Re: filecompletion in ksh93 #=20 # 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? # #=20 # # You can't. You have to type awkward, nonintuitive characters #=20 # Wrong. You can. There might be better solutions than mine here. This o= ne # works in vi mode, and the next one in emacs. #=20 # function vi_tab # { # # what looks like a space on the next line is a physical tab # if [[ ${.sh.edmode} =3D=3D "=1B" && ${.sh.edchar} =3D=3D " " ]] then # .sh.edchar=3D"=1B\\" # elif [[ ${.sh.edmode} !=3D "=1B" && ${.sh.edchar} =3D=3D "=3D" ]] then # .sh.edchar=3D"=3Da" # fi # } #=20 # trap 'vi_tab' KEYBD #=20 # function emacs_tab # { # # what looks like a space on the next line is a physical tab # if [[ ${.sh.edchar} =3D=3D " " ]] then # .sh.edchar=3D"=1B=1B" # fi # } #=20 #=20 #=20 #=20 #=20