You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it is possible to disable paging in CLI via bat --paging=never. To make this configuration global, the help page / man pages suggest overriding the pager environment variable, BAT_PAGER. However, this behavior seems to be error-prone:
If BAT_PAGER is overridden, it is hard to "fix" it in CLI. Normally, env variables are overridden by CLI keys. E.g. with the standard CLI conventions, if you have BAT_PAGING=never and you'd run bat --paging-never, you'd get paging. With the current version of bat (0.23.0 (871abd27)), this is impossible.
This might be low-prio because I'm actually intending to set bat to non-paging mode by default and may not even switch back. I'm leaving this to the author's discretion. I'm also not sure if the issue is a "bug" (inconsistency with the standard CLI conventions), or simply a feature request. Triaging is welcomed
Thanks for the nice tool! ❤️
The text was updated successfully, but these errors were encountered:
Just to get a sense of this, would an alias with --no-paging not be suitable for your use case? I'd expect the need for paging/no-paging to be related to using an interactive shell as cat seems a better used tool if there's not a user involved.
@YeungOnion do you mean an alias with --paging=never? That does definitely help and that is what I'm currently doing locally. bat can do much more than cat even without paging: syntax highlight, line numbers and overall formatting just to name a few
Ah, you're right and that's what I meant. I'm thinking now that I just have too strong a preference that environment variables are a user's responsibility.
Currently, it is possible to disable paging in CLI via
bat --paging=never
. To make this configuration global, the help page / man pages suggest overriding the pager environment variable,BAT_PAGER
. However, this behavior seems to be error-prone:If
BAT_PAGER
is overridden, it is hard to "fix" it in CLI. Normally, env variables are overridden by CLI keys. E.g. with the standard CLI conventions, if you haveBAT_PAGING=never
and you'd runbat --paging-never
, you'd get paging. With the current version ofbat
(0.23.0 (871abd27)
), this is impossible.This might be low-prio because I'm actually intending to set
bat
to non-paging mode by default and may not even switch back. I'm leaving this to the author's discretion. I'm also not sure if the issue is a "bug" (inconsistency with the standard CLI conventions), or simply a feature request. Triaging is welcomedThanks for the nice tool! ❤️
The text was updated successfully, but these errors were encountered: