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.5k stars 376 forks source link

Tab completion and syntax error for "forge" command with name collision #4603

Open odysseus0 opened 8 months ago

odysseus0 commented 8 months ago

Discord username (optional)

No response

Describe the bug

I have installed the Foundry development kit for Ethereum which provides a command called forge. However, Warp also provides tab completions for Atlassian's forge CLI tool. Even though the Foundry forge command is properly added to my $PATH and I never installed Atlassian's forge, Warp highlights it with a red underline as if it's not found.

When I try to use tab completion on forge, Warp provides the completions for the Atlassian tool rather than the Foundry one. This makes it difficult to use Foundry's forge command in Warp.

To reproduce

  1. Install Foundry development kit which provides the forge command. Link
  2. Ensure forge is in $PATH and takes precedence over other forge commands
  3. Open Warp terminal
  4. Type forge and observe red syntax error underline
  5. Try using tab completion on forge and observe completions for wrong tool

Expected behavior

I expect Warp to recognize the forge command from Foundry since it is properly in $PATH, without syntax error highlighting. Tab completions should be provided for Foundry's forge rather than a different, identically named tool that is not even installed.

Screenshots

CleanShot 2024-03-20 at 22 05 52@2x

Operating system

MacOS

Operating system and version

14.4.0

Shell Version

No response

Current Warp version

v0.2024.03.12.08.02.stable_02

Regression

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

Recent working Warp date

No response

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

dannyneira commented 8 months ago

Hey @odysseus0 I was able to reproduce this issue, it looks like even though the forge command is error underlined, the subcommand is showing up so you should be able to use it for the time being that way. We'll post updates on this thread.

CleanShot 2024-03-21 at 10 30 51

odysseus0 commented 8 months ago

No no no. the subcommand showing up is for Atlassian forge you guys have completion support for, not the forge installed here!

CleanShot 2024-03-21 at 17 21 56@2x

I hope that this screenshot would make things a bit more clear

dannyneira commented 8 months ago

Oh i see, then its another forge for blockchain. As a fall-back measure you can run zsh or your preferred shell and run the forge commands with completions in a subshell. This will not have the blocks/warp completions, but should work like a normal terminal. Hope this helps!

dino-rodriguez commented 1 month ago

@dannyneira Is there a more generic solution to this? Seems pretty weird to have to run a subshell even though I don't have atlassian forge installed