From 3dfedf581458f88982289f58db884bc65f1e635b Mon Sep 17 00:00:00 2001 From: Isabella Basso Date: Fri, 17 Feb 2023 11:38:40 -0300 Subject: [PATCH] docs/config.md: add example for using pipes As discussed on issue #1273, pipe usage on the jj config differs from git and hg. Signed-off-by: Isabella Basso --- docs/config.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/config.md b/docs/config.md index 1b113f36d..26de904b6 100644 --- a/docs/config.md +++ b/docs/config.md @@ -182,6 +182,15 @@ a `$`): `less -FRX` is the default pager in the absence of any other setting. +### Processing contents to be paged + +If you'd like to pass the output through a formatter e.g. +[`diff-so-fancy`](https://github.com/so-fancy/diff-so-fancy) before piping it +through a pager you must do it using a subshell as, unlike `git` or `hg`, the +command will be executed directly. For example: + +`ui.pager = ["sh", "-c", "diff-so-fancy | less -RFX"]` + ## Aliases You can define aliases for commands, including their arguments. For example: