renameutils
renameutils
rename and copy files by editing their names: qmv, imv and friends
curl -fsSL https://unflab.app/get | sh -s -- renameutils
Installs to ~/.local/bin. Add --prefix /usr/local/bin to
put it somewhere else, or --uninstall to remove it.
Why it’s here
Escapes a dependency tree: Homebrew’s build pulls in libraries this tool never touches at run time.
Details
| Original package | renameutils |
| Version | 0.13.0 |
| Licence | GPL-3.0-or-later |
| Upstream | https://github.com/unflab-app/renameutils |
| Source | renameutils-0.13.0.tar.gz |
| Download | renameutils-0.13.0.macos-arm64.tgz |
Built from that exact tarball, with its SHA-256 pinned in the
recipe. The binary links against nothing outside /usr/lib
and /System/, checked in CI before release.
Tools for renaming and copying files by editing their names, rather than
by typing them out twice.
qmv/qcpopen a list of file names in your editor
($VISUAL, then$EDITOR). Change the names, save and quit, and the
files are renamed or copied to match. Swaps and cycles (a→b,
b→a) are handled.imv/icpprompt for a new name with the old one already
filled in, so you only edit the part that changes.deurlnamedecodes URL-encoded names:my%20file.txtbecomes
my file.txt.
qmv *.jpg # rename a batch in the editor
qmv -f do . # one column: just the destination names
imv 'Long Report (final).pdf'
deurlname *%20*
man qmv and man imv have the rest.
Install
./install.sh # into ~/.local/bin
./install.sh --prefix /usr/local/bin
./install.sh --uninstall
About this build
This is the unflab-app fork
of renameutils, whose last upstream release was 0.12.0 in 2012. The fork
exists so that renameutils works on macOS with nothing but the system:
qmvandqcpread directories themselves instead of running GNU
ls, ordering files the way GNUlsdoes for every listing option.imvandicppre-fill the old name using libedit, which macOS
provides, and work with macOS’s ownmvandcp.- UTF-8 names appear as themselves in the editor, case-only renames
work on macOS’s case-insensitive file system, anddeurlnamenever
replaces an existing file.
Homebrew’s renameutils depends on coreutils and GNU readline. This one
links only libedit and libSystem, which macOS provides in
/usr/lib. Line editing follows libedit’s emacs bindings and reads
~/.editrc.
Options for imv and icp are passed straight to macOS’s mv and
cp, so GNU-only ones like --backup aren’t available. Messages are in
English: this build leaves out the translations.
Upstream’s qcmd and icmd, which only work when told which command to
be, aren’t installed.