Hi Marc,
Many thanks for your message.
I have added a feature request to add a new configure option to define
if paginate should be done or not, without changing the pager
definition.
I have also added another feature request to add an abbreviated
version for --paginate option. Maybe -p should be ok, as it seems to
be the standard abbreviation used by commands (like git).
I do not see any command having a abbreviation for --no-pager. So I
would prefer not to have an abbreviation for this one.
Best regards,
Xavier
Le jeu. 9 oct. 2025 à 19:07, Paul Markfort <pau...@gm...> a écrit :
>
> For now, you could define an alias of, module-no-pager which is just "module --no-pager" (autocomplete would fill it out if you use module-n<TAB>).
>
> If you set MODULES_PAGER="" (or use --no-pager).
> Then you can still pipe the output of things like "module avail" through more, etc (which is what I would expect most users to do if it didn't page by default - in the old days that was not easy as the output of module avail went to stderr).
>
> If you currently use: "module avail | cat" this will also stop paging (any redirection of stdout will turn off paging).
>
>
> I do think it could be helpful to add the ability to change the default to --no-pager, then have a --pager option to reverse it.
> Maybe even a --pager= (so you can override the default without setting a variable)
> That is just --pager Means use default
> or you could use --pager=more
>
>
>
> I think pager and paginate do different things (I am not sure what, probably needs more detail in the man page).
>
> --no-pager
> Do not pipe message output into a pager.
>
> --paginate
> Pipe all message output into less (or if set, to the command referred in
> MODULES_PAGER variable) if error output stream is a terminal. See also MODULES_PAGER
> section.
>
> --redirect
> Send message output to stdout instead of stderr. Only supported on sh, bash, ksh, zsh
> and fish shells.
> (I think this is the default for information commands like module avail).
>
> --no-redirect
> Do not send message output to stdout. Keep it on stderr.
>
>
>
>
>
>
>
>
>
>
>
> On 2025-10-09 4:36 AM, Marc Castells wrote:
> > Hi Xavier, All,
> >
> > Is there a way for a user to configure the default pager mode in Modules? As far as I can see, the options are:
> > a) Disable the pager feature altogether by clearing MODULES_PAGER or assigning it the value "cat". No pagination is available.
> > b) Accept the default pagination with "less -eFKRX" and make the user disable it manually with "-no-pager"
> >
> > I am looking for a third option:
> > c) Keep "less -eFKRX" in MODULES_PAGER but allow the default pagination to be no-pager. If the user wanted to paginate the output, they would need to explicitly use "-paginate"
> >
> > This c) option to me is the most natural behaviour and allows the user to configure a default pagination mode whilst having the option to override it with an explicit command line switch. The current functionality is not neutral as It's skewed towards displaying the output with pagination by default.
> >
> > While on the subject, would it be possible to consider shortcuts for the "-paginate" and "-no-pager" command line options?
> >
> > Many thanks,
> >
> > Marc.
> >
> >
> > _______________________________________________
> > Modules-interest mailing list
> > Mod...@li...
> > https://lists.sourceforge.net/lists/listinfo/modules-interest
> >
>
> --
> --------------------------------------------------------
> The views and opinions expressed above are strictly
> those of the author(s). The content of this message has
> not been reviewed nor approved by any entity whatsoever.
> --------------------------------------------------------
> Paul FM Info: http://paulfm.com/~paulfm/
> --------------------------------------------------------
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
|