Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Actively warn user when PSIC is not active terminal during execution of PowerShell: Run Selection #3547

Open
@cruscio

Description

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.

Summary

If executing PowerShell: Run Selection when the active terminal is not a PowerShell Integrated Console (e.g. by a user switching between bash and pwsh tabs, on a Linux remote SSH session), it would be ideal to warn the user, instead of the current behavior to run the selected code in the active terminal regardless. This would prevent unintentionally, and possibly harmfully, executing commands in an unintended context.

The current behavior is to silently log a message and execute in the current terminal.

Proposed Design

The logic already exists to detect this scenario and log it. There would need to be a modified action after detection.

Couple proposals to be implemented by either a new configuration setting or by hard coding:

  • Modify the behavior to prompt/warn/cancel, instead of just logging a message, when the active terminal isn't a PSIC.
  • Modify the behavior to change the active terminal to a PowerShell Interactive Console before running the selection.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /