Re:Rumors of Cmd’s death have been greatly exaggerated
by anonymfus on Thursday January 05, 2017 @08:18AM
(#13326843)
There is a third way: you can create PowerShell Host application with the same .Net API that PowerShell ISE uses.
[ Parent
| on HN ]
Re:Rumors of Cmd’s death have been greatly exaggerated
by quotemstr on Thursday January 05, 2017 @11:25AM
(#13328426)
I tried that --- specifically, I made a readline-powered psh host for my own use. There are a few problems in practice:
1) readline hardcodes the backslash in a bunch of places, especially in history expansion. Psh needs '^', not '\'.
2) the psh hosting APIs aren't ready: powershell.exe uses a few internal APIs to which other hosts don't have access, and without these APIs, psh does helpful things like wrap lines at 80 characters and paginates output.
I also recall there being some problem with psh's completion.
Still, it's amazing that embedding the CLR and posh inside a Cygwin process works at all.