summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-09-04 13:38:39 -0400
committerDan Davison <dandavison7@gmail.com>2020-09-04 13:38:39 -0400
commite9ecd151b5a02a941d4fb1815cfbbbedd213df65 (patch)
treef0cd190610b52a0875aba202a940719bc3040ca9 /README.md
parent0887fadd27c3a2ca3906233bcafad9408f64dece (diff)
Document DELTA_NAVIGATE env var
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/README.md b/README.md
index aa44673f..5f00173f 100644
--- a/README.md
+++ b/README.md
@@ -388,13 +388,21 @@ In order to support this feature, Delta has to look at the raw colors it receive
Use the `navigate` feature to activate navigation keybindings. In this mode, pressing `n` will jump forward to the next file in the diff, and `N` will jump backwards. If you are viewing multiple commits (e.g. via `git log -p`) then navigation will also visit commit boundaries.
-The recommended way to use `navigate` is to activate it only when needed, for example by doing
+The recommended way to use `navigate` is to activate it only when needed, for example by using the environment variable `DELTA_NAVIGATE`:
+
+```bash
+DELTA_NAVIGATE=1 git diff
+```
+
+Please note that if the environment variable is set to _anything at all_ (even `"false"` or `"0"` or `""`) then it is considered "true": to deactivate it you must unset the environment variable (e.g. using `unset DELTA_NAVIGATE`).
+
+An alternative is to mutate your git config file from the command line:
```bash
git config --global delta.navigate true
```
-The reason is the following: Delta uses `less` as its pager, and the `navigate` feature works by doing `less --pattern <regex-matching-file-and-commit-lines>`. When the git output does not contain file/commit diff lines, `less --pattern` behaves unhelpfully (see [#234](https://github.com/dandavison/delta/issues/234), [#237](https://github.com/dandavison/delta/issues/2)).
+The reason that `navigate` should not be used all the time is that Delta uses `less` as its pager, and the `navigate` feature works by doing `less --pattern <regex-matching-file-and-commit-lines>`. When the git output does not contain file/commit diff lines, `less --pattern` behaves unhelpfully (see [#234](https://github.com/dandavison/delta/issues/234), [#237](https://github.com/dandavison/delta/issues/2)).
### 24 bit color (truecolor)