Skip to content

Commit 93f360b

Browse files
committedFeb 10, 2021
Update the README
1 parent 767ea02 commit 93f360b

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed
 

‎README.md

+8-18
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,6 @@ Installation is as simple as cloning this repo and then putting the `diff-so-fan
1818

1919
## Usage
2020

21-
diff-so-fancy can be used with the standard `diff` tool, and can even be configured as the default for diffs with git.
22-
23-
### With diff
24-
25-
Use `-u` with diff to for unified output, and pipe the output to `diff-so-fancy`:
26-
27-
```shell
28-
diff -u file_a file_b | diff-so-fancy
29-
```
30-
31-
You could, of course, create a function for it too. In your `~/.bashrc` or `~/.zshrcz` for example:
32-
33-
```shell
34-
function dsf() { diff -u "$1" "$2" | diff-so-fancy; }
35-
```
36-
37-
And than you can just type `dsf file_a file_b` to get nice looking diff output.
38-
3921
### With git
4022

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

51+
### With diff
52+
53+
Use `-u` with `diff` for unified output, and pipe the output to `diff-so-fancy`:
54+
55+
```shell
56+
diff -u file_a file_b | diff-so-fancy
57+
```
58+
6959
## Options
7060

7161
### markEmptyLines

0 commit comments

Comments
 (0)
Please sign in to comment.