Skip to content

Commit

Permalink
Update the 'Pager' section in README
Browse files Browse the repository at this point in the history
  • Loading branch information
bugen committed Dec 12, 2023
1 parent d59b89b commit 9ffcd31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,12 @@ $ seq 5 |ppp -i math 'line, math.sqrt(int(line))'
```
## Pager
pypipe, by default, pipes the output to a pager. The default pager command is `less -R -F` (recommended, tested). If you want to disable the pager, you can set the `PYPIPE_PAGER_ENABLED` environment variable to `false`. Additionally, you can change the pager command by setting the `PYPIPE_PAGER` environment variable.
### Enable/Disable Pager
In pypipe, the pager is automatically enabled if the standard output is a tty. To disable the pager, set the `PYPIPE_PAGER_ENABLED` environment variable to `false`. Additionally, you can enable/disable the pager by specifying the `--paging` or `--no-paging` options. This takes precedence over the `PYPIPE_PAGER_ENABLED` setting. However, if the standard output is not a tty, specifying `--paging` will not enable the pager.
### Pager command
The default pager command is `less` (recommended, tested). You can change the pager command by setting the `PYPIPE_PAGER` environment variable. If `less` is specified as the PAGER, pypipe automatically adds the options set in the `PYPIPE_LESS_OPTS` environment variable. The default value for PYPIPE_LESS_OPTS is `-R -F`.
### Pager for `-p, --print`
> [!Warning]
Expand Down

0 comments on commit 9ffcd31

Please sign in to comment.