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

lsd -l --header doesn't filter ANSI sequences #775

Open
GnikDroy opened this issue Nov 18, 2022 · 3 comments · May be fixed by #777
Open

lsd -l --header doesn't filter ANSI sequences #775

GnikDroy opened this issue Nov 18, 2022 · 3 comments · May be fixed by #777
Labels
kind/bug Something isn't working

Comments

@GnikDroy
Copy link

GnikDroy commented Nov 18, 2022

I would mark this as a bug. But my issue template was not accepted. Couldn't figure out why, didn't think it matters much either.
This is a problem in the latest version, possibly all versions with --header.

Current Behaviour

lsd -l --header doesn't filter ANSI sequences when not on a tty/pty
lsd -l --header | less for example

Expected Behaviour:

It should filter ANSI sequences.

@zwpaper
Copy link
Member

zwpaper commented Nov 19, 2022

Hi @GnikDroy, thanks for reporting this, can you append a screenshot to show your example and expected, piping lsd -l --header works fine in my case, maybe there is something I did not notice.

@GnikDroy
Copy link
Author

GnikDroy commented Nov 19, 2022

Additional information

OS: Arch 6.0.8 x64 GNU/Linux
Terminal: Kitty 0.26.5
Shell: fish 3.5.1
LSD: 0.23.1

Tested with less and neovim :!lsd -l --header

1668875784

@GnikDroy
Copy link
Author

GnikDroy commented Nov 19, 2022

@zwpaper I think it is related to the underline sequence. I think I read the source and figured out where the potential problem might have been. But I did not pry further.

https://github.com/Peltoche/lsd/blob/f5ee0a2b5143b975c277a1c53870c08c6e211c37/src/display.rs#L180-L187

I do not know if this is filtered later but, there is no check for isatty here.

@GnikDroy GnikDroy linked a pull request Nov 19, 2022 that will close this issue
5 tasks
@meain meain added the kind/bug Something isn't working label Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants