Allows you to rename files interactively using $EDITOR
. Inspired by itchyny/mmv.
I like itchyny/mmv a lot but didn't want to have to have Go on my machine to compile it. I decided that I wanted that functionality to be in a language that my machine was more likely to understand immediately upon a new install, so I attempted to reimplement those features in Bash.
This implementation lacks more checks than it possesses. For example, it does not check for duplicate inputs. I typically don't make the mistake of passing it duplicate inputs, so it's not something I wanted to worry about.
mmv <filename1> ...
mmv <common substring>*
mmv *
This implementation of mmv can:
- swap file names
- appropriately nest items
git clone https://github.com/McAuleyPenney/mmv.git ~/.config/mmv
printf "\n# source mmv\n. ~/.config/mmv/mmv.sh\n" >> ~/.bashrc
- or just copy and paste the script into the shell functions you already source
bash 4.0
or greater for associative array support