Skip to content

Commit

Permalink
Move hyperlinks help text section
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Jul 29, 2020
1 parent e159b43 commit 3425364
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,18 @@ pub struct Opt {
/// --file-renamed-label.
pub navigate: bool,

#[structopt(long = "hyperlinks")]
/// Render commit hashes, file names, and line numbers as hyperlinks, according to the
/// hyperlink spec for terminal emulators:
/// https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda. By default, 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).
pub hyperlinks: bool,
#[structopt(long = "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.
Expand Down Expand Up @@ -341,19 +353,6 @@ pub struct Opt {
/// (overline), or the combination 'ul ol'.
pub file_decoration_style: String,

#[structopt(long = "hyperlinks")]
/// Render commit hashes, file names, and line numbers as hyperlinks, according to the
/// hyperlink spec for terminal emulators:
/// https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda. By default, 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).
pub hyperlinks: bool,

/// Format string for file hyperlinks. The placeholders "{path}" and "{line}" will be replaced
/// by the absolute file path and the line number, respectively. The default value of this
/// option creates hyperlinks using standard file URLs; your operating system should open these
Expand Down

0 comments on commit 3425364

Please sign in to comment.