OhMyREPL.jl
OhMyREPL.jl copied to clipboard
Update prompt.jl
Allow for integer to call Base.text_colors to change the colors in the prompt.
I think this fixes some of the issues mentioned here: https://github.com/KristofferC/OhMyREPL.jl/issues/258
Needs some kind of documentation for people to be able to use this.
I added an example in the documentation; also I added the integer choice for output and fixed the type in the doc.
Also I did not see a documentation for the color choices anywhere so I took a screenshot for each integer. I wonder where this could fit or whether this could be useful?
![Screen Shot 2022-02-04 at 16 57 52](https://user-images.githubusercontent.com/1526426/152614213-126867ef-0c09-4546-a39d-9b3a59c199a2.png)
doesn't the "number -> actual color on your screen" depend on your terminal's palette?
Good question. My guess is that it depends to some extent to my palette. But tbh, I could not find any mention of using Base.text_colors anywhere. I just think it would nice to have it somewhere.
Here is the blurb:
dint = filter( p -> first(p) isa Int, Base.text_colors)
for (key, value) in dint
print(value); print("▐"*string(key));
end
Btw, this is a little bit of a tangent and has nothing to do with the PR at this point.
my suggestion is to not show this screenshot, it's not relevant to the API, basically we just need to tell users this is 256 color pallet in some terminal etc. (some terminals have true color support)
I agree. I was merely asking if Julia should have this somewhere. I just could not see documentation for text_colors.
I guess this means we could converge on merging this.
Thanks, and sorry for the very slow feedback here.