Skip to content

robenkleene/ren-find

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ren

ren is a command-line utility that takes find-formatted lines via standard input, and batch renames them. By default, it outputs a diff-preview of the renamed files and directories to standard output, and with a flag it can rename the files and directories.

Rename with ren

Example

Output a diff to standard output showing the result of finding all the files containing foo in their name, and replacing foo to bar in their names:

find . -name '*foo*' | ren foo bar

Add the -w (--write) flag to rename the files:

find . -name '*foo*' | ren foo bar

Installation

ren is available via cargo:

cargo install ren-find

Configuration

The default pager is less, the REN_PAGER environment variable can be used to override the pager (e.g., export REN_PAGER=delta in Bash).

Help

ren -h (or ren --help, the full --help provides slightly longer explanations of some option) will list help for all the command-line flags.

Acknowledgements

  • Much of the functionality, and the overall structure of the source code, was borrowed sd. ren began as a fork of sd.
  • The code for specifying a custom pager for ren was borrowed from delta.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages