3 ms·
There is a third way: you can create PowerShell Host application with the same .Net API that PowerShell ISE uses.
by anonymfus 10y ago
There is a third way: you can create PowerShell Host application with the same .Net API that PowerShell ISE uses.
- quotemstr 10y agoI 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.