Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnews!lvc From: lvc@cbnews.cb.att.com (lawrence.v.cipriani) Newsgroups: comp.unix.shell Subject: Re: set filec in the KSH? Summary: correction Message-ID: <1991Apr15.141632.3138@cbnews.cb.att.com> Date: 15 Apr 91 14:16:32 GMT References: <1991Apr14.175109.10183@magnus.acs.ohio-state.edu> <1991Apr14.222646.29794@cbnews.att.com> Organization: Ideology Busters, Inc. Lines: 61 In article <1991Apr14.222646.29794@cbnews.att.com>, lvc@cbnews.att.com (lawrence.v.cipriani) writes: > In article <1991Apr14.175109.10183@magnus.acs.ohio-state.edu> mcover@magnus.acs.ohio-state.edu (Mark Coverdill) writes: > > > >Having used the csh for many months I find myself having to switch to > >the ksh. I really miss the ability to complete a filename by hitting > >the ESC key aka the 'set filec' command in the csh. Is there such a > >command in the ksh? > > You can use followed by * for filename completion. I got a correction to this: + Yes, but the equivalent to ESC on the csh is ESC \ in ksh. ie, + it will expand only to the common prefix if there is more than + 1 match. If you have files "psycho" and "psyllium", then hitting + ESC * after a p will expand to "psycho psyllium_" while ESC \ + will expand only to "psy_" ... + -- + + Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ + + UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com > For example, suppose in my home directory is: > > $ ls $HOME > psycho > loopy > > Then I can enter: > > $ vi $HOME/p* > > and the command completes to: > > $ vi $HOME/psycho_ > > the _ marking the cursor position. That's what I get for not testing out every post. What it really expands to is: $ vi /u/lvc/p_ If you give a complete path and enter * you'll get: $ vi /u/lvc/psycho_ Probably what you want to use is \. Also, if you enter = you'll get a list of filenames that match the pattern. So in Edward's example, typing: $vi /u/lvc/p= gives you: 1) psycho 2) psyllium $ vi /u/lvc/p_ -- Larry Cipriani, att!cbvox!lvc or lvc@cbvox.att.com "Offensive is in the eye of the beholder." -- me