Skip to content
This repository was archived by the owner on Mar 4, 2022. It is now read-only.

Conversation

@williamboman
Copy link

Not expecting this PR to be merged for multiple reasons.

I changed the output styling to something that I find much more readable. The way it parses the user-generated content is quite hacky, badly written and nonetheless unreliable, but 60% of the time it works every time.

Here's a preview image, thoughts?

mine..current

And here's one with xargs;

Short explanation on how it parses submissions;

  • It splits each submission string by \n.
  • If the first line starts with a # it is considered a header (yellow, capitalized).
  • Any subsequent line starting with # is considered a comment (green, indented).
  • If the search query is found in a line, consider that line a shell command (prefix with $). Also highlight the match(es).
  • If the line starts with a $, consider that line a shell command.
  • Assume it's a comment otherwise.

@williamboman williamboman force-pushed the patch-1 branch 2 times, most recently from 8263402 to b042ee9 Compare March 26, 2015 18:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant