-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fre for files : how? #25
Comments
Hey @jefftemplon! fre just provides an API to store access events -- it does not mandate where those events come from. Directories are fairly straightforward because we can add shell hooks that log an access event with
So, to get it to work with files, you'll need to define which events count as an access, then add a hook to call |
Hi,
Thanks for this - it gives me enough information to get started.
JT
… On 16 Jan 2024, at 15:53, Camden Cheek ***@***.***> wrote:
Hey @jefftemplon <https://github.com/jefftemplon>! fre just provides an API to store access events -- it does not mandate where those events come from. Directories are fairly straightforward because we can add shell hooks that log an access event with fre --add. Files are a little trickier because "opening a file" can mean a bunch of different things:
Open in vim
Open in emacs
Inspect with cat
Rename the file
echo "test" >> file
...plus basically any other thing that interacts with a file
So, to get it to work with files, you'll need to define which events count as an access, then add a hook to call fre --add <file>. You might decide that you really only care about files you open with vim, so you add an autocommand that calls fre --add on the file. I don't personally use fre for files, so I don't have any complete examples
—
Reply to this email directly, view it on GitHub <#25 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAI5BONF6WJT5TLXZZZQZBTYO2H6TAVCNFSM6AAAAABB45MXUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJTHEYDOMRSGM>.
You are receiving this because you were mentioned.
|
I've got something working! A related question: can What works:
|
Hi, managed to deal with the fre binary. The only thing I have left is that the expansion for |
I have something working - do you want me to contribute something to the docs about it? |
Hey! Glad to hear you got it working. Adding something to the docs would be great -- thank you! |
This note documents how to use The use caseI often access files located in Here I had typed Here is an example
|
Is this enough for you to put something under examples? |
Yes! This is great -- I'll get this integrated. Thanks! |
I saw the other discussion about paths, and now I have |
Hi,
The intro in the docs says "for tracking your most-used directories and files" - everything else in the docs refers to directories. How to use it for files?
What I'd like to achieve is to replace
fasd
, so when I typeless ,2022
, I get a completion list of all files and directories I've recently accessed that have2022
somewhere in the name or path, frecency sorted.The text was updated successfully, but these errors were encountered: