aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Daniel Smith <rdnlsmith@gmail.com> 2020-03-01 21:36:14 -0500
committerGravatar Daniel Smith <rdnlsmith@gmail.com> 2020-03-01 21:36:14 -0500
commitea8b29a0a7144166e0950a0d2a1e0d43176a3c06 (patch)
tree21ae9f94f19348b0547b7f27edf0869f8f7dcc3c
parentfe7e28576ac7044a89b4db3d4357bd219e43ccea (diff)
Update README with install/usage instructions
-rw-r--r--README.md34
1 files changed, 33 insertions, 1 deletions
diff --git a/README.md b/README.md
index b7799fd..cfc085e 100644
--- a/README.md
+++ b/README.md
@@ -4,11 +4,43 @@
[diff-highlight](https://github.com/git/git/tree/master/contrib/diff-highlight)
(and, eventually,
[diff-so-fancy](https://github.com/so-fancy/diff-so-fancy)) on Windows, because Perl and Windows
-[don't](https://github.com/so-fancy/diff-so-fancy/issues/361) seem to
+[don't seem](https://github.com/so-fancy/diff-so-fancy/issues/361)
+to
[get along](https://github.com/microsoft/terminal/issues/4738) when it comes to ANSI coloring.
This project is still in early development.
+## Installation
+
+Make sure you have PowerShell Core (`pwsh.exe`) in your `PATH` somewhere. Then, copy the `pwsh-diff`
+script to a directory in your `PATH`. That's it!
+
+## Usage
+
+Configure Git to use `pwsh-git` for all diff/log output:
+
+```ps
+git config --global core.pager "pwsh-diff | less --tabs=4 -RFX"
+```
+
+### Improved colors
+
+`pwsh-diff` will read the same color settings expected by `diff-highlight`, and it depends on Git
+itself to colorize everything besides the lines with highlighted bits. The following options are
+recommended:
+
+```ps
+git config --global color.ui true
+
+git config --global color.diff-highlight.oldNormal "red bold"
+git config --global color.diff-highlight.oldHighlight "red bold 52"
+git config --global color.diff-highlight.newNormal "green bold"
+git config --global color.diff-highlight.newHighlight "green bold 22"
+
+git config --global color.diff.old "red bold"
+git config --global color.diff.new "green bold"
+```
+
## Acknowledgements
Much of the requisite logic has been adapted directly from the aforementioned