summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-10-21 23:36:51 -0400
committerDan Davison <dandavison7@gmail.com>2020-10-21 23:39:01 -0400
commit0b3d8fbe290e8f88c8ce6ba4e77cdaf37f63581c (patch)
tree84bfab769c043a8f23f631336d40d60bc1317dee
parentf19f1ba00aeed63dee8ead85334084fb92257a5c (diff)
Document that `less -r` flag is needed for hyperlinks to work
Ref #362, #332. Thanks @torarnv!
-rw-r--r--README.md11
-rw-r--r--src/cli.rs7
2 files changed, 8 insertions, 10 deletions
diff --git a/README.md b/README.md
index 5b466721..ace4f753 100644
--- a/README.md
+++ b/README.md
@@ -553,7 +553,7 @@ and use the executable found at `./target/release/delta`.
## Full --help output
```
-delta 0.4.4
+delta 0.4.5 (dev)
A viewer for git and diff output
USAGE:
@@ -577,11 +577,10 @@ FLAGS:
file names and line numbers link to the local file using a file URL, whereas commit
hashes link to the commit in GitHub, if the remote repository is hosted by GitHub.
See --hyperlinks-file-link-format for full control over the file URLs emitted.
- Hyperlinks are supported by several common terminal emulators. However, they are
- not yet supported by less, so they will not work in delta unless you install a
- patched fork of less (see https://github.com/dandavison/less). If you use tmux,
- then you will also need a patched fork of tmux (see
- https://github.com/dandavison/tmux)
+ Hyperlinks are supported by several common terminal emulators. To make them work,
+ you must pass the -r (as opposed to -R) flag to less, e.g. via `export
+ DELTA_PAGER=less -rX`. If you use tmux, then you will also need a patched fork of
+ tmux (see https://github.com/dandavison/tmux)
--keep-plus-minus-markers Prefix added/removed lines with a +/- character, exactly as git does. By default,
delta does not emit any prefix, so code can be copied directly from delta's output
--show-config Display the active values for all Delta options. Style options are displayed with
diff --git a/src/cli.rs b/src/cli.rs
index 863b2af5..57ea19d8 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -241,10 +241,9 @@ pub struct Opt {
/// and line numbers link to the local file using a file URL, whereas commit hashes link to the
/// commit in GitHub, if the remote repository is hosted by GitHub. See
/// --hyperlinks-file-link-format for full control over the file URLs emitted. Hyperlinks are
- /// supported by several common terminal emulators. However, they are not yet supported by
- /// less, so they will not work in delta unless you install a patched fork of less (see
- /// https://github.com/dandavison/less). If you use tmux, then you will also need a patched
- /// fork of tmux (see https://github.com/dandavison/tmux).
+ /// supported by several common terminal emulators. To make them work, you must pass the -r (as
+ /// opposed to -R) flag to less, e.g. via `export DELTA_PAGER=less -rX`. If you use tmux, then
+ /// you will also need a patched fork of tmux (see https://github.com/dandavison/tmux).
pub hyperlinks: bool,
#[structopt(long = "keep-plus-minus-markers")]