4 ms·
Very interesting, I’ll definitely give it a try! Another approach I recently discovered is an old but beautiful Unix-style tool for renaming files: vidir - edi
by 037 1y ago
Very interesting, I’ll definitely give it a try!
Another approach I recently discovered is an old but beautiful Unix-style tool for renaming files: vidir - edit a directory in your text editor. It’s part of the moreutils suite [1].
You get the list of filenames in your editor – edit them as you like, save, exit, and it renames the files. It uses whatever editor is set in your $EDITOR env var, so it doesn’t have to be vi/vim.
You can also pipe in a list of files, e.g. `find . -type f | vidir -`, to edit just the files you want - and you can even change paths (add, rename, remove directories) in the editor to move files around easily.
To try it quickly on macOS: `brew install moreutils`
[1] https://joeyh.name/code/moreutils/ https://joeyh.name/code/moreutils/
- ddlsmurf 1y agoif you can forgive a shameless plug, I wrote https://github.com/ddlsmurf/fled https://github.com/ddlsmurf/fled some time ago and it serves me very well to this day. (It's not half as advanced as OP's tool but still useful)
- robertlutece 1y agooh wow, this feels like https://github.com/stevearc/oil.nvim https://github.com/stevearc/oil.nvim
- chiffaa 1y ago> You get the list of filenames in your editor – edit them as you like, save, exit, and it renames the files. It uses whatever editor is set in your $EDITOR env var, so it doesn’t have to be vi/vim. I'm not sure how "powerful" vidir is, but I recently found this functionality in yazi [1] and it became one of those "you think you don't need it until you try it" features [1] https://github.com/sxyazi/yazi https://github.com/sxyazi/yazi
- jiehong 1y agoThis is also integrated into Emacs with dired, and it’s pretty neat [0]. [0]: http://xahlee.info/emacs/emacs/rename_file_pattern.html http://xahlee.info/emacs/emacs/rename_file_pattern.html