flirt

Crates.ioflirt
lib.rsflirt
version
sourcesrc
created_at2024-12-01 01:17:55.339373
updated_at2024-12-22 22:46:12.333543
descriptionFiLe InteRacT, the file interaction tool for your command line
homepagehttps://git.sr.ht/~hadronized/flirt/
repositoryhttps://git.sr.ht/~hadronized/flirt/
max_upload_size
id1467102
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Dimitri Sabadie (hadronized)

documentation

README

FiLe InteRacT, the file interaction tool for your command line

This is a small program that starts an interactive file selection process from your current pwd and allows you to select relative files, returning them to your command line once you are done.

Examples below invoke flirt with a keybinding set on ^s.

Interactive cd

asciicast

Let’s say you would like to locate a directory, but you also want to grab information about the structure of the parent directories — a very common case during new code base exploration. A typical way is to do that with a fuzzy finder – many people use [fzf] with its c-t binding that opens a fuzzy picker to search for files:

cd ^t

However, this is not always wanted, especially when you do not know exactly what you are looking for, and are in exploration mode. Instead, you can start an interactive cd like so:

cd ^s

This will start flirt and will allow you to move around the filesystem. Once you have found the target directory, just end your interactive session (q by default) and you should have the path of the directory to go to in your cd command line.

Interactive move

asciicast

flirt expands all the selected paths on the command line, so you can use it for commands that expect several arguments. For instance, let’s say you would like to move a file from a directory into another one, without being entirely sure about the files you need to move nor where:

mv ^s

Interactive tar creation

asciicast

A more complex example is tarball creation. Write the static part of the command (tar -cvf tarball.tar.gz) and let flirt do the rest for you!

Interactively run commands on different files

asciicast

A very powerful workflow: pick some files and edit in your favorite $EDITOR commands to run on them. Once you close your editor, the commands are run.

Filtering

asciicast

Filtering allows to filter the content of the current directory with a regex, providing a nice way to cut the number of files down to what you need.

User Guide

Please find the user guide here.

Installation guide

Archlinux

You can use the AUR to install the flirt package. Follow these recommended steps:

mkdir ~/aur && cd ~/aur
git clone https://aur.archlinux.org/flirt.git && cd flirt
# inspect the PKGBUILD; YOU SHOULD ALWAYS DO THIS ON THE AUR!
makepkg -cis
Commit count: 0

cargo fmt