Pistos / diakonos

Diakonos is a console text editor for the masses.
https://git.sr.ht/~pistos/diakonos
Other
137 stars 11 forks source link

CTRL-O + a letter fails with too many entries #17

Closed amichail closed 12 years ago

amichail commented 12 years ago

FuzzyFileFinder::TooManyEntries: FuzzyFileFinder::TooManyEntries

This problem occurs under OS X Lion.

Pistos commented 12 years ago

This is true. :) But that's a safety feature to prevent Diakonos from hanging when scanning very large folders. There are three config settings which can help here:

fuzzy_file_find false

This would turn fuzzy file finding off completely. Tab completion would still work, of course.

fuzzy_file_find.max_files 8192

You can also set the number of files Diakonos will search through before raising that TooManyEntries exception.

fuzzy_file_find.ignore tmp/*
fuzzy_file_find.ignore log/*

You can specify paths that the fuzzy file finder won't dive into, if you know you're not interested in opening any files under those paths. It uses the glob syntax of http://www.ruby-doc.org/core-1.9.3/File.html#method-c-fnmatch .

I hope this helps!

Pistos commented 12 years ago

You might also run into this issue if your current working directory is the root of the filesystem, or some other heavily-populated place on the filesystem. Consider moving away from such large directories first before starting Diakonos.

amichail commented 12 years ago

The error still occurs with a limit of 10 million.

Pistos commented 12 years ago

I think that indicates that the file finder has found 10 million matching entries .. :)

Seriously: What would be your desired behaviour in the case of 10 million matching files?

amichail commented 12 years ago

I don't have 10 million files. It also doesn't work with 100 million. There's a bug there somewhere. Maybe there's something in the OS X file system that is not handled correctly?

Pistos commented 12 years ago

I've never personally run into a symlink cycle or anything like that. But I also don't try to open files from shallow parts of my filesystem. I would expect that the file finder handles cycles already, though. Would you be able to make a gist containing a list of the files in the tree you're searching from?