Skip to content

dhirajgagrai/diffrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diffrs

A diff tool that employs the longest common subsequence algorithm to compare files and strings.

Usage

Files

diffrs <file_1> <file_2>

Strings

To compare two strings, add the -w flag:

diffrs -w <string_1> <string_2>

Building and Installation

To get started, first install Rust, and then run the following commands:

git clone https://github.com/dhirajgagrai/diffrs.git
cd diffrs 

# Compile
cargo build --release

# Run
cargo run --release -- examples/file_1.txt examples/file_2.txt

To use diffrs command, create a symlink or copy the executable to a directory in your $PATH.

sudo cp target/release/diffrs /usr/local/bin

Project Goals

  • Add line-oriented format
  • Support hunks
  • String comparisons from CLI

Feel free to contribute, report issues, or provide feedback to help improve the project.

About

Rust-based diff tool using LCS algorithm

Resources

Stars

Watchers

Forks

Languages