Add a simple way to use colours, for individual keys
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 36
- Forks
- 21
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 1
Description
pp is great.
Sometimes you have a large datastructure, a hash, and it is hard to see which entries belong where to.
For instance I had:
:files=>
"/home/x/data/personal_2_bis_6.pdf",
"/home/x/data/personal2010_Scan.pdf",
"/home/x/data/personalfoo_8.pdf"],
:directories=>
["/home/x/data/personal/one/",
"/home/x/data/personal/two",
"/home/x/data/personal/three",
The real data was much longer.
I'd like to see the keys :files and :directories in another colour, such as blue and green.
These colours should a) have a default, and b) can be customized by the user.
This is for terminal display.
And, the API for this should be simple.
Such as:
pp hash, :default_colours
Or:
Pp.use_default_colours # and then pp
And it should be documented somewhere, ideally here on github too with usage example code.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing pp API and terminal display behavior. Clarify how per-key colours, default colours, and user customization should interact, including the proposed pp hash and Pp.use_default_colours examples. Document the decided API with usage examples and verify it works for large hashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100