sykloid / etc

My Very Own ~/etc
http://sykloid.org/
46 stars 6 forks source link

Make the spectrum array values hidden, to avoid junking `set` output #4

Closed apjanke closed 1 year ago

apjanke commented 9 years ago

Hi sykora, here's a suggestion. In spectrum, the arrays could have their values hidden. This way, the terminal control codes they contained aren't included in the output of set, which will end up messing up the colors and display for the rest of its output. (And making grep think it's binary output.)

Enough people are picking up this code that I think it would be nice to include this. I found this while using oh-my-zsh, which uses a fork of this code. (My set output has been wonky for months and I finally figured out it was this.) And at least one StackOverflow answer references it.

I've put in a PR for OMZ, too, at robbyrussell/oh-my-zsh#3965.

sykloid commented 1 year ago

Seven years later, I finally see that there's a merge request here :|. A number of instances of garbage text on the screen might have been explained if I'd read it sooner.

Since moving to truecolor terminals however, I've deprecated spectrum so it's no longer necessary.