edit file paths
Currently this program does behave as described below, but maybe not as you would expect in all cases.
ls | edfp
edfp reads stdin, assumes each line is a path to a file object (file or directory) and allows for easy manipulation of those objects.
- Changing the name of the file will rename it.
- Clearing the line will delete it.
$ mkdir playground && cd playground
$ touch a b c
$ ls
a b c
$ ls | edfp
Your VISUAL
(or EDITOR
if unset) program of choice will be opened with each line representing a file path:
a
b
c
Let's say you edit it to this:
x
y
Write and quit your editor. You'll be prompted like so:
DELETE the following files:
b
RENAME the following files:
a → x
c → y
Would you like to make the changes described above (y/n)?
Type y
and hit enter!
$ ls
x y
You renamed a → x and c → y and deleted b. Good job!
cargo build
MIT. See LICENSE.