4 ms·
I'm really sad I missed the boat so hard on Powershell. I grabbed it at the first public release (beta? alpha?), and the thing was absurdly slow. Trying to `ls
by strbean 6y ago
I'm really sad I missed the boat so hard on Powershell.
I grabbed it at the first public release (beta? alpha?), and the thing was absurdly slow. Trying to `ls` took around 10 seconds. I nope'd out and didn't touch it again.
Now I have a coworker who uses it religiously (on linux, who would have thought!) and when I'm watching over his shoulder I'm astounded by how great it is.
- throwaway894345 6y agoHow do people use environment variables with powershell? I often want to do `FOO=bar ./program`, but this doesn't seem to be supported. I googled briefly, but there weren't many satisfactory answers.
- majkinetor 6y ago$Env:FOO='bar'; ./program
- brutt 6y agoIt's equivalent of `export FOO='bar'; ./program` , which is not same as `FOO='bar' ./program`, which, in turn, is equivalent to `OLD_FOO="$FOO"; export FOO='bar'; ./program; export FOO="$OLD_FOO";` .
- xfer 6y agothere isn't a directly supported way. you write a function to backup, run and restore the old variable to get the same behaviour. Not very ideal.