-
-
Notifications
You must be signed in to change notification settings - Fork 3
get words to highlight from another text file #8
Comments
Actually, I'm completely ok with the idea to use a file with patterns. Although, some questions should be discussed. This is a current CLI
That basically means two things:
You need to research whether it's possible to have either As for your questions, I think it would be nice to have color customization per pattern. Perhaps we can use JSON instead plain text, so it would be easy to do. |
I'll see what I can do for the CLI interface parts, those should be simple to move around based on feedback, even though i used it didn't click with me that While I agree with json being nice to have, my main concern is speed when using a utility like this... my use case was something like this: i had a huge log file that was becoming a strain to look at and match some stuff together, so i went to find a highlighter tool, i already had a patterns file (generated output of another string of commands) and just wanted to get the highlighting working. In most scenarios like this (for me) creating a json is an extra mental barrier** to using the tool, however, it's probably easy to add once the core mechanism is already in place and i'd be happy to do it (would just use a different flag for the file type i suppose), though as I mentioned, haven't even had time to look at the code yet, will do that shortly. I'm hoping it'll be easy to add in :) **: is the reason I didn't opt to use something like clide which i saw recommended elsewhere because I didn't want to spend the (probably very few) minutes learning how to set up it's pattern files. - though now on second thought I've essentially proposed the same. -_- I'll start simple - random colours assigned to each line on a patterns file and work from there, probably won't PR that part but at least I'll get a feel for the code and see if I can pull off the rest. |
oh, also not a huge fan of the @Prefix personally, Will address all this at the end as it's just an entry point to lower level stuff and is thus super-flexible (gotta love arg/optparse and stuff!) edit: apologies to the person with the username 'prefix' - i figure they'll have a notification regarding this. |
@arahayrabedian Sorry for the delay, I was busy. Ok, I'll wait for your pull request. Let's just make it happen, and postpone further discussions until patch is implemented. :) |
I'm looking to implement something like how grep does it (see http://www.explainshell.com/explain?cmd=grep+-f), I haven't looked at the code yet but i'm happy to try to contribute, just want to make sure you'd be on the same page if that's implemented.
Might be an acceptable solution to alleviate issue #3, whilst not one command per-se (since it'd require a pattern file) it'd at least give the option... at the moment I didn't enjoy chaining
em
in more than 100 pipes.this leaves me some questions:
Let me know what you think and I'd be happy to get cracking.
The text was updated successfully, but these errors were encountered: