Replies: 4 comments 2 replies
-
Forgot to mention that in the above cron |
Beta Was this translation helpful? Give feedback.
-
I personally also prefer the cached_list to load extremely fast, which requires keeping locatedb much smaller. To do this, I have all my important repos for work/home projects within just
This keeps my ~/locatedb around 1-2MB instead of 20+ MB and loads instantly from telescope. It also generates the db so fast, that I can run loaddb in less than 2 seconds. So I can more frequently run the cron job to keep it up-to-date:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for sharing @rkulla!
Yes, I don’t have a mac for personal use, so it’s hard to debug the inevitable corner cases that later cause issues :). I’m happy to update the README with something more generic and to redirect to a GitHub discussion thread for more detailed discussions. |
Beta Was this translation helpful? Give feedback.
-
This was also discussed in #13 |
Beta Was this translation helpful? Give feedback.
-
I see there's a TODO item in the README for periodic updating of cache_list. Using your gupdatedb advice from
brew install findutils
, this cron job worked for me to update hourly:however, is there a reason you recommend gnu locate and updatedb, when equivalent bsd commands are already installed on (most) macs? There's also
mdfind
which taps into Spotlight's db (but is supposedly slower than locate).Not to mention that it's more common on MacOS to use launchctl a .plist file?
All of this automation requires some additional permissions for the scripts to generate files, thanks to SIP. So if someone understands this all better than me, they should consider coming up with a solution that is the least confusing and has troubleshooting steps, such as
putil -lint /path/to/.plist
,log show
, etc.Otherwise it's possibly not worth adding this todo item other than to say something generic like "Use your favorite scheduler" (and leave it up to the person to figure out).
Beta Was this translation helpful? Give feedback.
All reactions