rn is a command line tool to rename files and directories.
Its behavior is comparable with that of mv path/to/old_name path/to/new_name
.
You can already write this quiet elegant like this mv path/to/{old_name,new_name}
.
But rn has a more intuitive syntax and is arguably more semantic.
There are different possible ways to install rn. You can choose one of the following.
Archives of precompiled binaries for rn are available.
If you're an Arch Linux user and have an AUR helper like paru, then you can install rn from the AUR:
paru -S rn
-
Clone this repository:
git clone [email protected]:thled/rn.git
-
Change to project directory:
cd rn
-
Build and start the docker containers:
docker-compose up -d
-
Build the app:
docker-compose exec app cargo build --release
-
Copy binary:
cp app/target/release/rn TARGET
$ rn SOURCE NEW_NAME
- SOURCE = the file/directory to rename (possibly with absolute/relative path)
- NEW_NAME = new name of the file/directory
$ rn --help
for further assistance.
$ rn foo_file bar_file
$ rn path/to/foo_file bar_file
$ rn /absolute/path/to/foo_file bar_file
$ rn foo_dir bar_dir
$ rn path/to/foo_dir bar_dir
$ rn /absolute/path/to/foo_dir bar_dir
docker-compose exec app sh
cargo build
cargo run foo bar
cargo clippy
cargo fix
cargo fmt
cargo test
cargo watch -cx test -i tests/data
Please do contribute! Issues and pull requests are welcome.