zlacker

[parent] [thread] 2 comments
1. ZenoAr+(OP)[view] [source] 2026-01-07 21:13:22
You mean like this...

' "Here is an ampersand... &" '

To clarify, in PowerShell there is a difference between text between single quotes (e.g. '$test') and double quotes (e.g. "$test"). Single quote strings are literal strings, so whatever text is contained within them is reproduced as written. Double quote strings are expandable strings, which means that certain text inside the string is evaluated before it is returned. If you have double quotes in a literal string, you'll see double quotes within that string, and the same should be true for ampersands.

replies(1): >>haolez+Vv5
2. haolez+Vv5[view] [source] 2026-01-09 14:20:07
>>ZenoAr+(OP)
That works in some cases, not others. I'm not saying that PowerShell is bad, but it certainly isn't a masterpiece of design.
replies(1): >>ZenoAr+TVb
◧◩
3. ZenoAr+TVb[view] [source] [discussion] 2026-01-11 19:11:49
>>haolez+Vv5
What do you mean it works in some cases, not others? A literal string is a literal string in all cases.

As for it being a "masterpiece of design", it has it's quirks but compared to common Unix shells (aside from Nushell) it's far better. It doesn't need to have a perfect design in order to be a step above the competition.

I hope to continue to see the growth of Nushell, I can see that becoming the best shell one day.

[go to top]