This PR introduces a --pager flag to the juv cat command, allowing users to specify a custom pager tool for displaying the notebook’s contents. If the --pager flag is not provided, juv cat will default to the JUV_PAGER environment variable (if set).
When JUV_PAGER (or --pager) is set to bat, additional flags are automatically added to improve formatting, including syntax highlighting with an inferred file type based on notebook content (e.g., markdown or script).
This setup achieves the same effect as manually piping to bat if installed:
juv cat Untitled.ipynb | bat --language md --file-name 'Untitled.md'
or
juv cat Untitled.ipynb --script | bat --langugage py --file-name 'Untitled.py'
This PR introduces a
--pager
flag to the juv cat command, allowing users to specify a custom pager tool for displaying the notebook’s contents. If the--pager
flag is not provided, juv cat will default to theJUV_PAGER
environment variable (if set).When
JUV_PAGER
(or--pager
) is set tobat
, additional flags are automatically added to improve formatting, including syntax highlighting with an inferred file type based on notebook content (e.g., markdown or script).This setup achieves the same effect as manually piping to bat if installed:
or