Would the team be open (or opposed) to tying the `...
# atmos-dev
m
Would the team be open (or opposed) to tying the
atmos describe
pager into the broader configuration schema so that those pagers can be set via the
atmosConfig.Settings.Terminal.IsPagerEnabled()
or the flag
--pager
?
I'll happily draft the PR but don't want to step on any toes if this is something the team wants
a
@Michael that sounds good, thank you very much. All PRs are welcome
👍 1
e
Hrm..... That is how it should have been implemented.
@Shubham Tholiya ☝️
Let's confirm what he had in mind.
m
After reading into it more, this might be set already but I am probably using the deprecated parameters and not picking up our pager settings
e
Also, it looks like the docs for Pager are not up to date.
I believe it's supposed to support a custom pager command or a boolean of true or false.
If it's a Boolean of true, then it uses the built-in one. If it's a Boolean of false, then paging is disabled. And if it's anything else, it tries to execute that command.
And out of curiosity, help me understand what you are trying to accomplish? Just so we can make sure that use case is covered.
a
(the flag
--pager
is working now, you can disable paging by
--pager off
)
m
I saw there was this function in the schema:
Copy code
func (t *Terminal) IsPagerEnabled() bool {
	return t.Pager == "" || t.Pager == "on" || t.Pager == "less" || t.Pager == "true" || t.Pager == "yes" || t.Pager == "y" || t.Pager == "1"
So I was curious if I could pass in
less
as the pager for all commands via something like:
Copy code
settings:
  terminal:
    pager: "less"
    colors: true
    unicode: true
    syntax_highlighting:
      enabled: true
      formatter: terminal
      theme: tokyonight-night
e
Yeah, it shouldn't be statically coded for only less. We should support any pager. So my opinion would be that if it's any non-Boolean value, that we treat it as a command.
And yes, you should be able to specify
less
, but you wouldn't be able to specify
more
.
And out of curiosity, what are you missing out of less? Is it the search functionality?
I've asked @Shubham Tholiya to add search to our pager.
👀 1
m
Yep, the search is the main piece (besides being a graybeard who likes coreutils)