Coder Social home page Coder Social logo

fre's People

Contributors

camdencheek avatar foray1010 avatar joshbode avatar matthijskooijman avatar tinywombat765 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fre's Issues

fre for files : how?

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 type less ,2022, I get a completion list of all files and directories I've recently accessed that have 2022 somewhere in the name or path, frecency sorted.

Cargo.lock out of date

Cargo.lock in out of date in the 0.4.0 release. This is preventing me from updating the package I maintain for NixOS.

Remove deleted files / directories

How can I easily remove deleted files / directories from the output?

Ideally I could run a command to remove all of these, or only entries that match a glob or regex.

Investigate moving to stable

When the project started, Rust 2018 was nightly only. Now, there shouldn't be any nightly-only features and the project should probably be switched over to stable.

Tag 0.2

Hey, I've been using this fo years installed from crates.io. I recently wanted to package it and releaized that version 0.2 isn't tagged. Could you please do so. Thx.

fre appends $PWD to arguments on --add

Problem: fre saves input as absolute path, which conflicts with using it for non-path things like commands.

#!/bin/dash

set -o errexit
set -o nounset

repls() {
    echo "rlwrap sbcl"
    echo "rlwrap dash"
    echo "bash"
    echo "clisp"
    echo "guile"
    echo "iex"
    echo "python"
}

# Default store location is ~/.local/share/fre/
store_name=$(echo "cmd:$0" | md5sum | awk '{print $1}')

fzf_result=$({
    fre --sorted --store_name "$store_name"
    repls
} | awk '!x[$0]++' | fzf -m --reverse --height 15 --tiebreak=index)

if test -n "$fzf_result"; then
    fre --add "$fzf_result" --store_name "$store_name" && echo "$fzf_result"
fi

Here, $fzf_result would be something like rlwrap sbcl, but fre's suggestion on subsequent reruns would include $PWD, like so: /home/username/rlwrap sbcl.

(awk '!x[$0]++' trick is to avoid sort | uniq )

Use XDG state home rather than the data home.

Currently, fre stores its default store (fre.json) in ${XDG_DATA_HOME}/fre (usually resolving to ~/.local/share/fre/fre.json).

However, the XDG Base Directory Specification suggests:

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, โ€ฆ)
  • current state of the application that can be reused on a restart (view, layout, open files, undo history, โ€ฆ)

Would it make sense to use ${XDG_STATE_HOME}/fre instead?

The reason I'm considering this question is that currently the --store option to fre specifies a path to an alternate store.
My initial assumption when trying this was that just a name was required, and the storage location would be along-side the default store (e.g. --store=foo would resolve to ~/.local/share/fre/foo.json, rather than a file called foo in the current directory), so another possible improvement might be that if the value provided to --store is not an absolute path, it is assumed that the storage location should be in the same directory as the default store (wherever that is most appropriate) with --store=fre being synonymous with the default store.

I'm happy to make a PR if either of these (standard location or "named" stores) would be useful.

Plans on generalizing to arbitrary input

Hey :)
I really like the idea of fre and this frecency algorithm.

I would like to use the same algorithm for other stuff as well, not just directory and file tracking. In particular, at the moment I'm using raw fzf for my command run script and would like to include your frecency algorithm there as well.

Are there any plans to generalize fre to arbitrary input? Or do you know of a tool that already does this?

Thank you very much :)

Typo?

๐Ÿ“ Hey, did you mean "frequency" instead of frecency?

Publishing 0.2.0

cargo install still rocking that 0.1.0. Just opening this in case you forgot to publish it manually; If there's an actual reason to withhold master from crates.io I then apologize for inconvenience and this should be closed.

fre --stat: allow to customize the number of digits shown

I use fre to sort my file bookmarks. It is a really useful tool for me.
When I have not visited some files for a longer time period the shown score is 0.000
It would be nice to allow showing more than 3 digits. That way 0.000 would be e.g. shown as 0.00004
This could be done by e.g adding the option --stat-digits 5 (defaulting to the current value 3)

fre results not preferred with FZF

Apologies for posting here, as I'm quite certain this is more of an fzf question, but your default fre+fzf setup seems to be exactly what I'm looking for, so thought you might have some insight.

One bit I'm not clear on, is why in this scenario:
image

/Users/timkelty/Dev/cloud-extension-yii2 doesn't bubble to the top once I start searching yii2.
Before any query, the results are listed just as fre has them, but once I type a query, this folder gets unexpectedly pushed pretty far down, even though it should have preferential weight from fre.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.