Category Archive: Odd

Making functions *really* read-only

Over at the excellent PowerShell Team Blog, Bruce Payette wrote about Controlling PowerShell Function (Re)Definition.

However, making a function constant does not prevent it from being shadowed in child scopes. Given that a child scope is created in any script, new function definition or script block, this makes it very unconstant.

Read on »

What colour is yours?

I noticed something very odd today.

My PowerShell console thinks that the default white text is actually “DarkYellow.”

doesn't look yellow to me

If I set it to “White” there is no visible difference.

What colour is your default console?

Update: I’ve found a use for “darkyellow” being white. When you run something like findstr bla *.* the filename match is brighter, and so becomes “yellow” and stands out nicely.

ConsistentlyWeirdly, in CMD.exe, color 6 (dark yellow) actually is dark yellow.

Lastly, why is the default background’s “darkmagenta” actually a somewhat de-saturated dark blue?