On Wed, Aug 27, 2008 at 9:29 PM, Benoît Dejean <[EMAIL PROTECTED]> wrote: > Package: findutils > Version: 4.4.0-2 > Severity: normal > > Hello, > > I use bash-completion. > When i'm in my ~ and want to run a java program, > i type 'java P<tab>' to actually run 'java Prime', > then bash spawns a > > find . -type f -path ./P*.class
Really! Yikes! > which takes ~1min to complete and prints as expected './Prime.class'. > > stracing find shows than it actually scans my whole home directory > > Is it an intented behavior ? Well, find is doing what it was told to do. But what find is being told to do is likely a bad idea for users who try to use completions within large directory trees. > Should i then instead file a bug againt bash-completion ? I believe so. You could probably make this more efficient (with a slight change of result) by changing the find command to something like this: find . -maxdepth 1 \( -type f -name 'P*.class' \) -o \( -type d -name 'P*' \) However, this will not return ./P/Q/R/S/T/foo.class, even if that is the only class file below the current directory, so there is a change in functionality in my proposal. James. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]