this post was submitted on 07 Nov 2023
17 points (94.7% liked)

Linux

48100 readers
615 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Are there any CLI tools like zoxide that allow to quickly find recently opened files by fuzzy search instead of directories?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago
#!/bin/sh
# Select a file with fzf from a database sorted by frecency and open it using
# xdg-open. frece can be found at https://github.com/YodaEmbedding/frece

DB_FILE=${FRECE_FILES_DB:-$HOME/.cache/frecent-files.csv}
item=$(frece print "$DB_FILE" | fzf --tiebreak=index --scheme=path)

[ -z "$item" ] && exit 1
frece increment "$DB_FILE" "$item"

xdg-open "$item"

#!/bin/sh
# Update frece database

DB_FILE=${FRECE_FILES_DB:-$HOME/.cache/frecent-files.csv}
tmp_file=$(mktemp)
fd -H . ~ > "$tmp_file"  # use ~/.fdignore file to exclude certain dirs
frece update "$DB_FILE" "$tmp_file" --purge-old
rm "$tmp_file"