Skip to content

Commit

Permalink
Update the README
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed Feb 10, 2021
1 parent 767ea02 commit 93f360b
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,6 @@ Installation is as simple as cloning this repo and then putting the `diff-so-fan

## Usage

diff-so-fancy can be used with the standard `diff` tool, and can even be configured as the default for diffs with git.

### With diff

Use `-u` with diff to for unified output, and pipe the output to `diff-so-fancy`:

```shell
diff -u file_a file_b | diff-so-fancy
```

You could, of course, create a function for it too. In your `~/.bashrc` or `~/.zshrcz` for example:

```shell
function dsf() { diff -u "$1" "$2" | diff-so-fancy; }
```

And than you can just type `dsf file_a file_b` to get nice looking diff output.

### With git

Configure git to use `diff-so-fancy` for all diff output:
Expand Down Expand Up @@ -66,6 +48,14 @@ git config --global color.diff.new "green bold"
git config --global color.diff.whitespace "red reverse"
```

### With diff

Use `-u` with `diff` for unified output, and pipe the output to `diff-so-fancy`:

```shell
diff -u file_a file_b | diff-so-fancy
```

## Options

### markEmptyLines
Expand Down

0 comments on commit 93f360b

Please sign in to comment.