1
0
Fork 0
Enjoy easy copying and pasting for Rsync or SSH paths.
Find a file
EatDatPie_445 6ef9be18df Update README.md
Correct to point the correct URL.

Signed-off-by: EatDatPie_445 <eatdatpie_445@noreply.codeberg.org>
2025-11-13 03:59:04 +01:00
assets Hello, world! 2025-10-30 16:58:31 +08:00
LICENSE Hello, world! 2025-10-30 16:58:31 +08:00
README.md Update README.md 2025-11-13 03:59:04 +01:00
rr.sh Hello, world! 2025-10-30 16:58:31 +08:00

Ready Rsync (rr)

rr is a simple yet powerful Bash shell function designed to quickly generate formatted remote paths, primarily for use with tools like rsync, scp, or ssh.

It combines your current username, the system's IP address (IPv4 or IPv6), and the absolute path of a file, with optional path truncation for cleaner output. Features

  • Customizable Host: Outputs the global IPv4 or IPv6 address.
  • Path Truncation (Default): Automatically replaces the $HOME directory with ~.
  • Absolute Path Mode: Option to force display of the full, absolute path.
  • Seamless Integration: Defined as a function in your .bashrc for immediate use.
  • Autocompletion: Provides tab completion for all flags.

Ready-Rsync Demo

Installation

Since rr is a Bash function, installation involves adding the function definition and its associated completion logic to your shell configuration file (~/.bashrc or ~/.zshrc).

Copy the entire contents of the rr.sh file and paste it directly into your ~/.bashrc.

Option B: Source the file

You can source the script directly from your home directory.

  1. Download the function file:

    mkdir -p ~/.local/bin/ && cd ./local/bin && wget https://codeberg.org/EatDatPie_445/Ready-Rsync/raw/branch/master/rr.sh
    
  2. Add the following line to the end of your ~/.bashrc:

    # Load the Ready Rsync Path Generator
    source ~/.local/bin/rr.sh
    

2. Reload Bash

Execute the following command or open a new terminal session:

source ~/.bashrc

This program is licensed under GPLv3 or Later.