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

Apply colour to text that matched regexp #46

Closed
Wilfred opened this issue Jun 14, 2017 · 8 comments
Closed

Apply colour to text that matched regexp #46

Wilfred opened this issue Jun 14, 2017 · 8 comments

Comments

@Wilfred
Copy link

Wilfred commented Jun 14, 2017

Currently, the colours are only based on path: directories are a different colour, executable files are a different colour, etc.

It would be nice to highlight which parts of the path matched the current regexp. This would help understand why a given file matched the regexp.

@sharkdp
Copy link
Owner

sharkdp commented Jun 14, 2017

Thank you for the suggestion! In fact, that's something I already tried quickly but it turned out to be a bit more complicated than I thought due to the interleaving ANSI escape sequences.

I was planning to use underlining in order for this to work alongside the coloring. What do you think?

@Wilfred
Copy link
Author

Wilfred commented Jun 14, 2017

Sounds good to me!

@jmcomets
Copy link

jmcomets commented Jul 20, 2017

Opinion: color seems much more appropriate than underlining (a-la grep).
EDIT: I agree that underlining would work well as it doesn't conflict with the previously configured color in LS_COLORS.

Also, if no one is looking into this, I wouldn't mine giving it a try.

@sharkdp
Copy link
Owner

sharkdp commented Jul 29, 2017

Sorry for the late response. I'm currently not looking into this. Any help would be greatly appreciated!

@jmcomets
Copy link

jmcomets commented Sep 6, 2017

Follow up: I haven't been able to look at it that much, I've been busy with other repos (and vacation 🌴 🌞 ).

I'll keep at it here (warning: serious refactored version there, helps me understand but will likely never be merged as complex as it is).

@sharkdp
Copy link
Owner

sharkdp commented Sep 7, 2017

No worries and thank you very much for sharing this!

sharkdp added a commit that referenced this issue Sep 15, 2017
@sharkdp
Copy link
Owner

sharkdp commented Sep 15, 2017

First working prototype in #53

sharkdp added a commit that referenced this issue Sep 29, 2017
@sharkdp
Copy link
Owner

sharkdp commented Oct 7, 2017

I'm going to close this, as there seems to be no activity. If anyone is interested in reviving this, have a look at #53

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

No branches or pull requests

3 participants