Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 2.17 KB

README.md

File metadata and controls

65 lines (40 loc) · 2.17 KB

🚀 renedit

A simple and efficient command line bulk file renaming tool that works in concert with your favorite text editors

Demo

Demo.webm

Features

  • Efficient batch renaming workflow: 💨 Run → 🗒️Edit → 💾 Save → ✨ Rename
  • Can invoke your favorite text editors to determine the name of the file to be changed. e.g. Vim, Emacs, nano, etc. (-e, --editor option or $EDITOR environment variable)
  • Fail-safe: dry-run mode by default (run by -x, --execute option)

Usage

The arguments are as follows:

Usage: renedit [OPTIONS] --editor <EDITOR> <PATH>...

Arguments:
  <PATH>...  Target directories or files

Options:
  -e, --editor <EDITOR>                    Command of text editor [env: EDITOR=nvim]
  -d, --definition-file <DEFINITION_FILE>  Path to definition file
  -x, --execute                            Execute renaming (disable DRY-RUN mode)
  -y, --yes                                Allow all rename confirmations
  -h, --help                               Print help
  1. 💨 Run: Run this command like: renedit --editor nvim path/to/files --execute
  2. 🗒️Edit: When the command is invoked, the editor is automatically launched. A text file with the path to the file will open, edit it to the name you want to change
  3. 💾 Save: Overwrites the file and exits. For example, in Vim/Neovim, type :wq.
  4. Rename:
    • If the -x, --execute option is specified, you can batch rename to the changed name when you exit the editor. If not specified, the paths before and after the rename will be displayed.
    • When renaming, type y, yes or Enter at the confirmation prompt.
    • If you specify the -y or --yes option at startup, you can skip the confirmation and execute the renaming at once.

Installation

To build from source, clone this repository and run cargo install --path=.

License

MIT

Thanks

This tool was inspired by itchyny/mmv written in Go, Thanks!

Author

sheepla