Mail Archives: cygwin/2002/05/31/16:14:05
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/
- Raw text -