Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <5.1.0.14.2.20020531131102.0244eec0@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com Date: Fri, 31 May 2002 13:13:57 -0700 To: David T-G , "CygWin Users' List" From: Randall R Schulz Subject: Re: Bash complete (tab) slowdown? In-Reply-To: <20020531200054.GB1231@justpickone.org> References: <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20020531153844 DOT 02f32b88 AT pop DOT ma DOT ultranet DOT com> <200205311916 DOT g4VJGgBR008222 AT tango DOT euteka DOT lt> <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20020531153844 DOT 02f32b88 AT pop DOT ma DOT ultranet DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed David, BASH has hashing and provides some control over its operation: hash: hash [-r] [-p pathname] [-t] [name ...] For each NAME, the full pathname of the command is determined and remembered. If the -p option is supplied, PATHNAME is used as the full pathname of NAME, and no path search is performed. The -r option causes the shell to forget all remembered locations. If the -t option is supplied the full pathname to which each NAME corresponds is printed. If multiple NAME arguments are supplied with -t, the NAME is printed before the hashed full pathname. If no arguments are given, information about remembered commands is displayed. BASH builds its hash as individual commands are invoked and found via the PATH. For Tcsh to know these "up front," suggests, if not implies, that it has to take the time to build that hash table which seems like it would slow down the process of starting up, unless it keeps some form of this hash in persistent (file) storage. Randall Schulz Mountain View, CA USA At 13:00 2002-05-31, David T-G wrote: >Larry, et al -- > >...and then Larry Hall (RFK Partners, Inc) said... >% >% At 02:17 PM 5/31/2002, QQ wrote: >% > >... >% >My problem is this: when using bash's >% >complete feature (eg hitting tab key), >... >% >quite a time. This could be normal, >% >but problem is, that under tcsh >% >results appear immediately and without >... >% >% As for why this doesn't happen in tcsh, I can't say. I don't know anything >% about tcsh. > >tcsh builds a hash of all commands so that it can search quickly. >Fortunately, it's clever enough to see when a file disappears and to then >look for another version farther down the path, but it won't find a new >program unless you type "rehash" to rebuild it (or source your .cshrc, >which has all sorts of other problems but people love to do it anyway). > >I can only figure that bash doesn't have such a hash table. Given a path >setting of $PATH without executable 'x' in it, can you drop 'x' into >place and just run it or do you have to tell bash something like > > PATH=$PATH > >(which I seem to recall having had to do under UNIX with 2.05a in such a >situation, but I could be wrong) to get it to take a look again? > > >HTH & HAND > >:-D >-- >David T-G -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/