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
20.92k stars 358 forks source link

bash alias with "clear" shows output in blank screen. Is it because of "Block" concept in Warp? #5222

Open gigaimage opened 1 month ago

gigaimage commented 1 month ago

Dupe Check

Describe the bug

First, I've just started using Warp and so far I am very pleased with it's interface, simplicity (configuration), performance, and notebook sharing & AI features. Great work Warp team!

So here is something I noticed in Warp, little not user-friendly.

Enabling any one of the following aliases in ~/.bash_aliases, when run in Warp it results in a blank screen first, workaround is to cmd+Up to see the output block above the blank screen.

*`alias lsdots="clear && cd ~/ && lsd --directory-only ." ** **OR** **alias lsdots="clear && cd ~/ && ls -d .!(|.)"`**

This just works fine as expected in Mac Terminal and iTerm2, i.e. no blank screen and no need to scroll up workaround.

Is this a side effect in Warp due to its block concept?

To reproduce

see screenshots for Warp, and iTerm for comparison.

Expected behavior

No blank screen, just the output block with all "dot" artifacts (files and dirs).

Screenshots

Initial output : blank screen

Screen Shot 2024-08-13 at 4 36 25 PM

Workaround: cmd+Up to see the output block

Screen Shot 2024-08-13 at 4 14 20 PM

Comparison with iTerm:

Screen Shot 2024-08-13 at 4 14 01 PM

Operating system

MacOS

Operating system and version

Monterey 12.7.6

Shell Version

GNU bash 5.2.32-release (x_86_64-apple-darwin 21.6.0)

Current Warp version

v0.2024.08.06.08.01.stable_00 (from homebrew)

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?

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

dannyneira commented 3 weeks ago

Hi @gigaimage thanks for the kind words about Warp. You partly right, due to the way Warp clears the blocks, it cant be run in the same command with others or they will also be pushed up along with the clear. I recommend you have an alias that's set without clear in the command, you can press CTRL-L to clear without running the command, or press CMD-K to delete all the blocks in a session.

We already have a request tracking request to decouple clear from other commands here. https://github.com/warpdotdev/Warp/issues/2382

If you could please give it a 👍 and subscribe to that request, it would help us gauge interest. We'll post any updates there, so stay tuned!

Please let us know if that helped.

gigaimage commented 3 weeks ago

Thanks @dannyneira, I guess I missed #2382 before posting this. Please close this one as dupe to 2382.

Also, I like the new "ENUM" feature. It's very handy.

If you could point me to Warp docs for using bash functions from workflow, currently it copies entire function, but I just want to use the function with parameters on prompt. There must be some aliasing trick that I'm not aware of yet.

Second, a little annoying is when guided completion is enabled with or without enum, auto-completion doesn't work on cmd (i.e. tabbing doesn't work). It forces to use the mouse selection. Any idea why cmd auto complete doesn't work?