Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moar as pager showing invisible character while viewing a text file #161

Closed
ciscohack opened this issue Oct 7, 2023 · 18 comments
Closed

Comments

@ciscohack
Copy link

ciscohack commented Oct 7, 2023

Hi Johan,

I am sorry for reporting another issue where I am using ugrep to search the pattern in files while paging to moar. moar shows invisible character highlight those with colors and fills the screen with color that looks bad.. can you please fix or hide the invisible characters.

image
@ciscohack
Copy link
Author

ciscohack commented Oct 7, 2023

Hi Johan,

I am sorry for reporting another issue where I am using ugrep to search the pattern in files while paging to moar. moar shows invisible character highlight those with colors and fills the screen with color that looks bad.. can you please fix or hide the invisible characters.

image

If I use BAT as pager these invisible characters not show up and ugrep match only the pattern and output looks clean

@ciscohack
Copy link
Author

another observation if not use wrap text and scroll to the right moar fill the spaces with color which is really bad-looking output sometimes. example SS below ... this get worse with ugrep and other tools combination

image

@walles
Copy link
Owner

walles commented Oct 7, 2023

  1. Have you tried with --render-unprintable=whitespace?
  2. Please provide screenshots of the full windows. I don't understand where all that pink is coming from.

another observation

Please open separate tickets for separate issues.

@ciscohack
Copy link
Author

@walles thanks for the comment. this is not new issue but same issue pink coming from ugrep auto color as I used ugrep to search keywords and parse the output in moar pager. but in the second screenshot, I opened a text file without a wrap and scrolled it to right and grey color picked up by moar from theme

should I use "--render-unprintable=whitespace?" like this moar --render-unprintable=whitespace?

@walles
Copy link
Owner

walles commented Oct 7, 2023

Is there any way for me to reproduce this?

@ciscohack
Copy link
Author

@walles this option "--render-unprintable=whitespace" solved invisible character issue but if I scroll to the right then empty or blank area filled with grey color

Yes you can reproduce by opening any text file and do not use wrap then scroll right to read long text and you will see the issue

@walles
Copy link
Owner

walles commented Oct 7, 2023

I was talking about reproducing the pink background.

Please open another ticket for the wrapping issue.

@ciscohack
Copy link
Author

@walles pink colour issue disappeared with this option "--render-unprintable=whitespace". so now you can focus on second issue

@walles
Copy link
Owner

walles commented Oct 7, 2023

But I would like to know where the pink is coming from.

Do you have repro instructions?

@ciscohack
Copy link
Author

ciscohack commented Oct 7, 2023

OK, Here is the step I was running on my terminal to search traffic flow from src and dst port and the command was

ugrep '5080.*5075' <file_name.txt> | moar

@walles
Copy link
Owner

walles commented Oct 7, 2023

  1. What if you just moar file_name.txt? Without ugrep? Does that show anything in pink?
  2. Is it possible for you to provide (some part) of the input file as well? I'm guessing the input file contents might have something to do with this.

@ciscohack
Copy link
Author

@walles No, if I run moar file_name.txt then I don't see pink color but if I scroll to right then the empty area is filled with grey color as shared above.

There is no relation with the input file as the input file is just a plain firewall log file having src/dst IP and port details. sorry can't share the log but if you want to reproduce it. then follow below steps

-- Use kitty terminal having onedark pro theme.
-- Use the ugrep color always option and pattern as I mentioned in the above screenshot for log files having IP and port details ...hopefully, you will see the issue.

@walles
Copy link
Owner

walles commented Oct 8, 2023

I can repro the grey background thingy in Kitty, let me look into that.

It works in iTerm2, so I'll just have to make sure to emit ANSI escape codes that work in both.

walles added a commit that referenced this issue Oct 8, 2023
It fails.
@ciscohack
Copy link
Author

Thanks! I see you have closed my previous ticket related to colour style issue I raised... is there any fix update coming for that? I didn't see any update but issue is marked as fixed

@walles walles closed this as completed in e0c8d4b Oct 10, 2023
@walles
Copy link
Owner

walles commented Oct 11, 2023

That fix was released with moar 1.18.0 about seven hours ago now.

Tickets close when fixes are merged to master rather than on releases going out. This is confusing on my end as well...

@ciscohack
Copy link
Author

@walles Thanks! Is this release has colour fix also?

@walles
Copy link
Owner

walles commented Oct 11, 2023

Scrolling right should work in Kitty with that release.

Also, using the theme color for not-highlighted files is in there, but it might need --colors=16m to work. Will fix that in a patch release.

@ciscohack
Copy link
Author

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants