Skip to content

Commit 20b70f1

Browse files
Merge branch 'next' of github.com:so-fancy/diff-so-fancy into next
2 parents c12b91a + 1a2c709 commit 20b70f1

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,22 @@ perl:
1313
matrix:
1414
include:
1515
- os: osx
16-
osx_image: xcode7.3
16+
osx_image: xcode9.4
1717
language: generic
1818
perl: 5.24
1919
allow_failures:
2020
- perl: "blead"
2121

22+
addons:
23+
homebrew:
24+
packages:
25+
- perl
26+
- shellcheck
27+
- cpanminus
28+
2229
before_install:
2330
- git clone --depth 1 https://github.com/sstephenson/bats.git
2431
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
25-
brew update;
26-
brew install shellcheck perl cpanminus;
2732
mkdir -p ~/perl5;
2833
fi
2934
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# diff-so-fancy [![Circle CI build](https://circleci.com/gh/so-fancy/diff-so-fancy.svg?style=shield)](https://circleci.com/gh/so-fancy/diff-so-fancy) [![TravisCI build](https://travis-ci.org/so-fancy/diff-so-fancy.svg?branch=master)](https://travis-ci.org/so-fancy/diff-so-fancy) [![AppVeyor build](https://ci.appveyor.com/api/projects/status/github/so-fancy/diff-so-fancy?branch=master&svg=true)](https://ci.appveyor.com/project/stevemao/diff-so-fancy/branch/master)
22

3-
`diff-so-fancy` strives to make your diff's **human** readable instead of machine readable. This helps improve code quality and help you spot defects faster.
3+
`diff-so-fancy` strives to make your diffs **human** readable instead of machine readable. This helps improve code quality and helps you spot defects faster.
44

55

66
## Screenshot
@@ -11,21 +11,23 @@ Vanilla `git diff` vs `git` and `diff-so-fancy`
1111

1212
## Install
1313

14-
Installation is as simple as downloading the [diff-so-fancy](https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy) script to a directory in your path.
14+
Installation is as simple as downloading the [`diff-so-fancy`](https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy) script to a directory in your path.
1515
Windows users may need to install [MinGW](https://sourceforge.net/projects/mingw/files/) or the [Windows subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
1616

1717
`diff-so-fancy` is also available from NPM, Nix, brew, and as a package on Arch Linux.
1818

1919
## Usage
2020

2121
Configure git to use `diff-so-fancy` for all diff output:
22+
2223
```shell
2324
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
2425
```
2526

2627
### Improved colors for the highlighted bits
2728

2829
The default Git colors are not optimal. The colors used for the screenshot above were:
30+
2931
```shell
3032
git config --global color.ui true
3133

@@ -47,41 +49,46 @@ git config --global color.diff.whitespace "red reverse"
4749
### markEmptyLines
4850

4951
Should the first block of an empty line be colored. (Default: true)
52+
5053
```
5154
git config --bool --global diff-so-fancy.markEmptyLines false
5255
```
5356

5457
### changeHunkIndicators
5558

5659
Simplify git header chunks to a more human readable format. (Default: true)
60+
5761
```
5862
git config --bool --global diff-so-fancy.changeHunkIndicators false
5963
```
6064

6165
### stripLeadingSymbols
6266

6367
Should the pesky `+` or `-` at line-start be removed. (Default: true)
68+
6469
```
6570
git config --bool --global diff-so-fancy.stripLeadingSymbols false
6671
```
6772

6873
### useUnicodeRuler
6974

70-
By default the separator for the file header uses Unicode line drawing characters. If this is causing output errors on your terminal set this to `false` to use ASCII characters instead. (Default: true)
75+
By default, the separator for the file header uses Unicode line-drawing characters. If this is causing output errors on your terminal, set this to `false` to use ASCII characters instead. (Default: true)
76+
7177
```
7278
git config --bool --global diff-so-fancy.useUnicodeRuler false
7379
```
7480

7581
### rulerWidth
7682

77-
By default the separator for the file header spans the full width of the terminal. Use this setting to set the width of the file header manually.
83+
By default, the separator for the file header spans the full width of the terminal. Use this setting to set the width of the file header manually.
84+
7885
```
7986
git config --global diff-so-fancy.rulerWidth 47 # git log's commit header width
8087
```
8188

8289
## Contributing
8390

84-
Pull requests are quite welcome, and should target the [`next` branch](https://github.com/so-fancy/diff-so-fancy/tree/next). We are also looking for any feedback or ideas on how to make diff-so-fancy even *fancier*.
91+
Pull requests are quite welcome, and should target the [`next` branch](https://github.com/so-fancy/diff-so-fancy/tree/next). We are also looking for any feedback or ideas on how to make `diff-so-fancy` even *fancier*.
8592

8693
### Other documentation
8794

report-bug.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ clipboard() {
2323
copy_cmd=clip
2424
fi
2525
# copy_cmd=clip
26-
elif which pbcopy >/dev/null 2>&1; then
26+
elif command -v pbcopy >/dev/null 2>&1; then
2727
copy_cmd="pbcopy"
28-
elif which xclip >/dev/null 2>&1; then
28+
elif command -v xclip >/dev/null 2>&1; then
2929
# copy_cmd="xclip -i -selection clipboard"
3030
copy_cmd="xclip"
31-
elif which xsel >/dev/null 2>&1 ; then
31+
elif command -v xsel >/dev/null 2>&1 ; then
3232
local copy_cmd="xsel -b"
3333
fi
3434
if [ -n "$copy_cmd" ] ;then

0 commit comments

Comments
 (0)