coc-powershell icon indicating copy to clipboard operation
coc-powershell copied to clipboard

feature: Restart terminal

Open mikeTWC1984 opened this issue 4 years ago • 2 comments

Summary of the new feature

Wondering if we can port vscode's "Restart current session" to this extension. I did some research about a year ago, and the only way to do this was to kill terminal pid directly. But somehow it was messing up my colors (I had separate theme for terminal and files). Maybe this can be achieved via language server now

Another thing I was looking for is to get powershell console up even without opening ps files. More like an alternative for calling :term, I think it's psic is more robust. Probably this can be achieved by vim settings, but might be another option for ps extensions.

mikeTWC1984 avatar May 22 '20 18:05 mikeTWC1984

I like this idea. We may need to port over the entire session class: https://github.com/PowerShell/vscode-powershell/blob/55ebbafeb8939cbea7ff9a8ea175c79181b1187b/src/session.ts

but coc has been really nice to us so far so it might be straightforward.

TylerLeonhardt avatar May 22 '20 18:05 TylerLeonhardt

In any case, here's restartSession:

https://github.com/PowerShell/vscode-powershell/blob/55ebbafeb8939cbea7ff9a8ea175c79181b1187b/src/session.ts#L243

TylerLeonhardt avatar May 22 '20 18:05 TylerLeonhardt