diff --git a/static/docs/command-reference/pipeline/show.md b/static/docs/command-reference/pipeline/show.md index cf6b661c04..c6afb09ce1 100644 --- a/static/docs/command-reference/pipeline/show.md +++ b/static/docs/command-reference/pipeline/show.md @@ -35,8 +35,8 @@ instead of stages. option is specified) of stage outputs instead of paths to DVC-files. - `--ascii` - visualize pipeline. It will print a graph (ASCII) instead of a - list of path to DVC-files. (To navigate, use arrows or `W`, `A`, `S`, `D` - keys. To exit, press `Q`.) + list of path to DVC-files. (`less` pager may be used, see + [Paging the output](#paging-the-output) below for details). - `--dot` - show contents of `.dot` files with a DVC pipeline graph. It can be passed to third party visualization utilities. @@ -52,6 +52,33 @@ instead of stages. - `-v`, `--verbose` - displays detailed tracing information. +## Paging the output + +This command's output is automatically piped to +[Less](), if available in the +terminal. (The exact command used is `less --chop-long-lines --clear-screen`.) +If `less` is not available (e.g. on Windows), the output is simply printed out. + +> It's also possible to +> [enable Less paging on Windows](/doc/user-guide/running-dvc-on-windows#enabling-paging-with-less). + +### Providing a custom pager + +It's possible to override the default pager via the `DVC_PAGER` environment +variable. For example, the following command will replace the default pager with +[`more`](), for a single run: + +```bash +$ DVC_PAGER=more dvc pipeline show --ascii my-pipeline.dvc +``` + +For a persistent change, define `DVC_PAGER` in the shell configuration. For +example in Bash, we could add the following line to `~/.bashrc`: + +```bash +export DVC_PAGER=more +``` + ## Examples Default mode: show stage files that `output.dvc` recursively depends on: @@ -72,8 +99,7 @@ cleanup.py raw data process.py data output ``` -Visualize DVC pipeline (To navigate, use arrows or `W`, `A`, `S`, `D` keys. To -exit, press `Q`.): +Visualize DVC pipeline: ```dvc $ dvc pipeline show eval.txt.dvc --ascii diff --git a/static/docs/user-guide/running-dvc-on-windows.md b/static/docs/user-guide/running-dvc-on-windows.md index e7eb6eaca0..a896dd7019 100644 --- a/static/docs/user-guide/running-dvc-on-windows.md +++ b/static/docs/user-guide/running-dvc-on-windows.md @@ -47,3 +47,18 @@ The performance of NTFS degrades while handling large volumes of files in a directory. [Here](https://stackoverflow.com/questions/197162/ntfs-performance-and-large-volumes-of-files-and-directories) is the resource for reference. + +## Enabling paging with `less` + +By default, DVC tries to use [Less]() +as pager for the output of `dvc pipeline show`. Windows doesn't have the less +command available however. Fortunately, there is a easy way of installing `less` +via [Chocolatey](https://chocolatey.org/) (please install the tool first): + +```dvc +$ choco install less +``` + +`less` can be installed in other ways, just make sure it's available in +`cmd`/Powershell, where you run dvc. (This usually means adding the directory +where `less` is installed to the `PATH` environment variable.)