warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.11k stars 361 forks source link

Unable to *warpify* the PowerShell Core snap. #4225

Open RokeJulianLockhart opened 7 months ago

RokeJulianLockhart commented 7 months ago

Discord username (optional)

https://discord.com/users/798720532848705576 ^1

Describe the bug

  1. powershell
  2. ```log PowerShell 7.4.1 PS /home/RokeJulianLockhart> [ -z $WARP_BOOTSTRAPPED ] && echo $0 | command -p grep -q zsh && unsetopt ZLE && eval 'setopt hist_ignore_space; unsetopt ZLE; WARP_IS_SUBSHELL=1; WARP_SESSION_ID="$(command -p date +%s)$RANDOM"; _hostname=$(command -pv hostname >/dev/null 2>&1 && command -p hostname 2>/dev/null || command -p uname -n); _user=$(command -pv whoami >/dev/null 2>&1 && command -p whoami 2>/dev/null || echo $USER); _msg=$(printf "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"shell\": \"zsh\", \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"is_subshell\": true}}" | command -p od -An -v -tx1 | command -p tr -d " \n"); printf '"'"'\x1b\x50\x24\x64%s\x9c'"'"' "$_msg"; unset _hostname _user _msg;' || [ -z $WARP_BOOTSTRAPPED ] && echo $0 | command -p grep -q bash && eval 'command -p stty raw;unset PROMPT_COMMAND;HISTCONTROL=ignorespace;HISTIGNORE=" *";WARP_IS_SUBSHELL=1;WARP_SESSION_ID="$(command -p date +%s)$RANDOM";_hostname=$(command -pv hostname >/dev/null 2>&1 && command -p hostname 2>/dev/null || command -p uname -n);_user=$(command -pv whoami >/dev/null 2>&1 && command -p whoami 2>/dev/null || echo $USER);_msg=$(printf "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"shell\": \"bash\", \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"is_subshell\": true}}" | command -p od -An -v -tx1 | command -p tr -d " \n");printf '"'"'\x1b\x50\x24\x64%s\x9c'"'"' $_msg;unset _hostname _user _msg;' || [ -z $WARP_BOOTSTRAPPED ] && [ $FISH_VERSION ] && eval 'set -g WARP_SESSION_ID (random);set _hostname $(command -v hostname >/dev/null 2>&1 && command hostname 2>/dev/null || uname -n);set _user $(command -v whoami >/dev/null 2>&1 && command whoami 2>/dev/null || echo $USER);set _msg $(echo -n "{\"hook\": \"InitShell\", \"value\": {\"session_id\": $WARP_SESSION_ID, \"user\": \"$_user\", \"hostname\": \"$_hostname\", \"shell\": \"fish\", \"is_subshell\": true}}" | od -An -v -tx1 | command tr -d " \n");echo -n \u1b\u50\u24"d$_msg"\u9c;set -e _hostname _user _msg;' ParserError: Line | 1 | [ -z $WARP_BOOTSTRAPPED ] && echo $0 | command -p grep -q zsh && uns … | ~ | Missing type name after '['. PS /home/RokeJulianLockhart> ```

To reproduce

  1. Install cpe:/o:opensuse:tumbleweed:20240220.
  2. Install https://docs.warp.dev/getting-started/getting-started-with-warp#opensuse-and-sle-based-distributions using https://releases.warp.dev/stable/v0.2024.02.20.08.01.stable_01/warp-terminal-v0.2024.02.20.08.01.stable_01-1.x86_64.rpm.
  3. Invoke /usr/share/applications/dev.warp.Warp.desktop.
  4. Invoke the configuration pseudo-window.
  5. Select “Subshells”.
  6. Add powershell to “Added commands”.
  7. Invoke powershell in the terminal.
  8. Accept the prompt to “warpify”.

Expected behavior

I expect to be able to use the Warp intelligence within the PowerShell instance.

Screenshots

No response

Operating system

Linux

Operating system and version

cpe:/o:opensuse:tumbleweed:20240220

Shell Version

sudo snap install powershell --channel=7.4.1/stable --revision 267 --classic

Current Warp version

v0.2024.02.20.08.01.stable_01, from warp-0.6.2-1.2.src

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

Never.

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

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

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

None

RokeJulianLockhart commented 7 months ago

https://github.com/warpdotdev/Warp/issues/4225#issue-2149674788

Potential duplicate of https://github.com/warpdotdev/Warp/issues/880#issue-1192181459, albeit more specific. Please triage.