File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,26 @@ Installation is as simple as cloning this repo and then putting the `diff-so-fan
18
18
19
19
## Usage
20
20
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
+
39
+ ### With git
40
+
21
41
Configure git to use ` diff-so-fancy ` for all diff output:
22
42
23
43
``` shell
You can’t perform that action at this time.
0 commit comments