15 stable releases
1.6.1 | Nov 6, 2022 |
---|---|
1.6.0 | Oct 24, 2022 |
1.5.0 | Jul 10, 2022 |
1.4.2 | Jan 3, 2022 |
1.1.4 | Sep 14, 2020 |
#252 in Command line utilities
58 downloads per month
105KB
382 lines
pipe-rename
pipe-rename
takes a list of files as input, opens your $EDITOR of choice, then
renames those files accordingly.
Installation
cargo install pipe-rename
This will install the renamer
binary.
Usage
Usage is simple, just pipe a list of files into renamer
. This will open your
$EDITOR (or vim, if not set), and once your editor exits it will detect which
files were renamed:
ls | renamer
You can also supply filenames as positional arguments. To rename txt files in the current directory:
renamer *.txt
The default behavior is to rename files, but you can override this. If you want
to run git mv old new
on each rename, you can do something like this:
ls | renamer --rename-command "git mv"
Helptext
Takes a list of files and renames/moves them by piping them through an external editor
USAGE:
renamer [OPTIONS] [FILES]...
ARGS:
<FILES>...
OPTIONS:
-c, --rename-command <COMMAND>
Optionally set a custom rename command, like 'git mv'
-e, --editor <EDITOR>
Optionally set an editor, overriding EDITOR environment variable and default
-f, --force
Overwrite existing files
-h, --help
Print help information
-p, --pretty-diff
Prettify diffs
-V, --version
Print version information
-y, --yes
Answer all prompts with yes
Contributors ✨
Marcus Buffett 🤔 💻 |
Robin Krahl 🤔 💻 🐛 |
Max Timkovich 💻 |
Benoit de Chezelles 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Dependencies
~3.5MB
~63K SLoC