murex
murex copied to clipboard
Recursive directory lookup enhancements
A few ideas to improve the recursive directory lookups in murex:
- [ ] exclusion paths
- [ ] pre-fetch cache
- [x] delayed autocompletion suggestions
Exclusion paths
It might be known before hand that some paths will return slower results (eg when reading from uncached mechanical drives, or when reading from /
).
This should be exposed via config
Pre-fetch cache
Maybe do a pre-fetch based on pwd
. However this would need to configurable via config
and honour any exclusion paths (above) too.
Delayed autocompletion suggestions
This would require another hack to readline:
- To support delayed suggestions ala delayed syntax highlights with spellcheck
- To crop the delayed suggestion to fit the existing suggestions tab box (in this instance I suggest including the first and last portions of the text with the unicode equivalent of
...
character)
Delayed autocompletion has been implemented and pushed to the recursive-directory-enhancements
branch (commit: ff34783). There are a few things to bare in mind:
-
This pushes the murex branch of
readline
further out of sync with themaster
branch. At this point in time, it's not safe to delete thevendors
directory and repopulate. -
The existing
config
option forrecursive-timeout
doesn't really make much sense any longer. So it's been removed and replaced with two new options:recursive-soft-timeout
andrecursive-hard-timeout
. The former is how long to wait before anything is displayed and the latter is how long to wait before the recursive lookup is killed entirely (and the progress so far is appended) -
There isn't any unit tests for this change. It's going to be quite a hard thing to write tests for too
The expectation is this will be merged into develop
soon (possibly even today) however I don't expect it to hit master
for Sunday nights/Monday mornings build pipeline as I'd prefer a little more beta testing first
re exclusion paths, currently murex just uses filesystem.Walk
because it was the fastest (in terms of development time) way to implement that feature. However it might make more sense to rewrite that where I can descend each directory one level at a time across the mapped tree (instead of descending down one branch at a time). This means partial searches will be more useful. I can then also incorporate exclusion paths too.