walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
600 stars 17 forks source link

Feature Request #66

Closed ciscohack closed 3 years ago

ciscohack commented 3 years ago

Hi Experts,

Can we have style options like we have in BAT tool to render a file in a way looks in screnshot or can be refer BAT style options.

image

walles commented 3 years ago

Have you tried the --style option?

Is that what you're after?

$ moar --help
Usage:
  moar [options] <file>
  ... | moar
  moar < file

Environment:
  Additional options are read from the MOAR environment variable if set.
  But currently, the MOAR environment variable is not set.

Options:
  -colors string
        Highlighting palette size: 8, 16, 256, 16M (default "16M")
  -debug
        Print debug logs after exiting
  -no-linenumbers
        Hide line numbers on startup, press left arrow key to show
  -style string
        Highlighting style from https://xyproto.github.io/splash/docs/longer/all.html (default "native")
  -trace
        Print trace logs after exiting
  -version
        Prints the moar version number
  -wrap
        Wrap long lines
$
ciscohack commented 3 years ago

@walles Thanks for response my friend. yes i have seen and tried but not seeing any effect or might be doing something wrong. can you show us some example of these options.

This is how i tried moar -style dracula -wrap i believe this should render dracula theme style but i still see my terminal theme style and bat if you see they have lines as seperator between line number horizontal and vertical both

walles commented 3 years ago

Can you post:

  1. The exact command line you're running? moar -style dracula -wrap is not complete, it lacks a file name. Please copy from your terminal right before you press enter.
  2. A screenshot of what moar looks like with that command line. Whole window, including title and borders please.
ciscohack commented 3 years ago

@walles I left file name intensionally as i was just trying to show you the moar command option only to see whether i am writing right or not. here style look like

image

walles commented 3 years ago

Please post what I asked for in https://github.com/walles/moar/issues/66#issuecomment-871927733.

ciscohack commented 3 years ago

My friend i am running command "moar -style dracula -wrap shure.log" and once i hit enter display is very similar to what i posted above in screenshot. no border line and title showing for me

walles commented 3 years ago

What exact command line did you use to get the screenshot with the lines in it and 2020 highlighted?

walles commented 3 years ago

What I'm after is, what is it that is coloring 2020?

Is it ITerm? Is it BAT? Something else?

ciscohack commented 3 years ago

What I'm after is, what is it that is coloring 2020?

Is it ITerm? Is it BAT? Something else?

I used hypterterm and BAT with script to highlight colors in first screenshot. but the borders is due to BAT tool.

In iterm2 for same i use trigger for color highlight and bat for border layout

walles commented 3 years ago

Can you get me a screenshot of the complete window when you run BAT in the macOS Terminal?

Displaying the same file as you are doing in HyperTerm.

ciscohack commented 3 years ago

here you go.

image

walles commented 3 years ago

Some observations:

  1. I don't see any colored 2020 in there.
  2. moar isn't involved.

So my conclusion is that your coloring problems are related to HyperTerm.

But since this isn't the same file as before it's hard to tell. Try again with:

ciscohack commented 3 years ago

@walles May i know why you focusing on color part i didn't ask moar is not showing color and all. macOS terminal not showing color becoz i didn't used the trigger for coloring if i enable trigger it will show color. Here my request is to show the border style the way BAT is showing.

walles commented 3 years ago

What you asked for initially was "style options". I assumed you were referring to colors.

moar's --style option affects colors only, so that won't help you.

Regarding those lines:

So I'm inclined to say "no" here.

ciscohack commented 3 years ago

Okay i understood your point now ..Thanks

ciscohack commented 3 years ago

please close the thread ..thanks for the help

ciscohack commented 3 years ago

@walles Sorry bothering you .. is it possible in near future more support .gz files to read the logs compressed with .gz extension or any other compression extension. Currently i use zless command to read without uncompressing it

walles commented 3 years ago

If you open any file with a .gz extension then moar will decompress it as it reads it.

ciscohack commented 3 years ago

Okay thanks i didn't find in help section and also on your git page ..sorry.

walles commented 3 years ago

Well spotted, README.md updated!

walles commented 3 years ago

And the --help message, will go into next release.