Skip to content

Pasted PowerShell code re-aligns once invoked. #6514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
RokeJulianLockhart opened this issue May 23, 2025 · 2 comments
Open
3 tasks done

Pasted PowerShell code re-aligns once invoked. #6514

RokeJulianLockhart opened this issue May 23, 2025 · 2 comments
Labels
Bugs Bugs, Hangs, Crash, and Freezes

Comments

@RokeJulianLockhart
Copy link

Pre-submit Checks

Describe the bug

When I paste PowerShell (Core) code into Warp, it separates the code into multiple segments, and misaligns the pasted code:

Image

This does not reproduce in Microsoft.WindowsTerminal_1.22.11141.0_x64__8wekyb3d8bbwe:

Image

To reproduce

Duplicate the undermentioned:

#!/usr/bin/env pwsh
Get-ComputerInfo | Select-Object -Property @(
	'OsName',
	'OsOperatingSystemSKU',
	'OsVersion',
	'OsBuildNumber'
) | Format-List

...into the clipboard:

Image

When duplicated into the clipboard, duplicate the content from the clipboard into Warp:

Image

When executed, the shebang shall be separated, and the input shall appear misaligned:

Image

For comparison, see the behaviour when pasted into Microsoft.WindowsTerminal_1.22.11141.0_x64__8wekyb3d8bbwe:

  1. Image

  2. Image

  3. Image

Expected behavior

It should not separate the shebang from the rest of the code, and should not modify the code alignment once pasted.

Screenshots, videos, and logs

No response

Operating system (OS)

Windows

Operating system and version

cpe:/o:microsoft:windows_11_24h2

Shell Version

Microsoft.PowerShellPreview_7.6.4.0_x64__8wekyb3d8bbwe

Current Warp version

v0.2025.05.21.08.11.stable_01

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

I do not know.

Additional context

No response

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

@RokeJulianLockhart RokeJulianLockhart added the Bugs Bugs, Hangs, Crash, and Freezes label May 23, 2025
@RokeJulianLockhart RokeJulianLockhart changed the title [Bug] Pasted PowerShell code re-aligns once invoked. Pasted PowerShell code re-aligns once invoked. May 23, 2025
@dannyneira
Copy link
Member

Hi @RokeJulianLockhart, thanks for letting us know. I was able to reproduce this issue, but noticed that if you exclude the shebang line, the command runs and formats correctly. Since the shebang is not required unless it's the top line of a .ps1 script, you can exclude it from the input as a workaround (or add it to and run a .ps1 script file). That being said, I'll submit this to the team as room for improvement.

Image

To anyone else facing this issue, please add a 👍 to the original post at the top or comment with your details, and subscribe if you'd like to be notified.

@RokeJulianLockhart

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes
Projects
None yet
Development

No branches or pull requests

2 participants