是否可以在 Powershell ISE 中重置运行空间? [英] Is it possible to reset the runspace in Powershell ISE?

查看:48
本文介绍了是否可以在 Powershell ISE 中重置运行空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PowerGUI 的功能之一是能够重置 Powershell Runspace这篇文章这篇文章.是否可以在 PowerShell ISE 中执行此操作?

One of the features of PowerGUI is the ability to reset the Powershell Runspace as demonstrated in this article and this article. Is it possible to do this in PowerShell ISE?

推荐答案

几个月前,我编写了一个名为ISE 会话工具"的模块来执行此操作.本质上,ISE 中的运行空间等同于Tab"容器,其子文档共享运行空间.我的脚本查看当前打开的文件,记住它们,创建一个新选项卡(运行空间)并关闭旧选项卡,然后将您打开的文件添加到新选项卡.其他功能:

I wrote a module called "ISE Session Tools" to do this a few months back. Essentially the runspace in ISE is equated to a "Tab" container, of which its child documents share the runspace. My script looks at the current open files, remembers them, creates a new Tab (runspace) and closes the old one, then adds the files you had open to the new Tab. Other features:

  • 自动保存当前会话(在当前选项卡中打开的文件.)

如果需要,可以禁用和手动控制.

This can be disabled and manually controlled if desired.

  • 提示在 ISE 打开时重新加载上一个会话

系统会向您显示提示,提醒您已打开的某些文件.按 接受默认的是,重新加载我的最后一个会话".

A hint is shown to you reminding you of some of the files you had open. Press <enter> to accept the default of "Yes, reload my last session."

  • 重新启动当前标签

基本上清理内存并在编辑器中保持文件打开.系统会提示您执行此操作.按 接受是,重新启动此选项卡"的默认设置.

Essentially cleaning memory and keeping your files open in the editor. You get prompted for this action. Press <enter> to accept default of "Yes, restart this tab."

鼠标固定的附加组件"菜单下可用的所有命令.这些命令也绑定到热键.

All commands available under "Add-ons" menu for the mouse-fixated. These commands are also bound to hot-keys.

参见:http://nivot.org/post/2011/02/14/MakingWindowsPowerShellISEGoodEnough

目前,ISE 会话工具 的博客下载链接已损坏.互联网档案馆仍然有 一份.

For the time being, the blog's download link for the ISE Session Tools is broken. The Internet Archive still has a copy.

这篇关于是否可以在 Powershell ISE 中重置运行空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆