warpdotdev / Warp

Warp is the agentic development environment, built for coding with multiple AI agents.
https://warp.dev
Other
24.02k stars 488 forks source link

Command output sometimes will be hidden if it's too long #6582

Closed kuixiong-jai closed 3 weeks ago

kuixiong-jai commented 1 month ago

Pre-submit Checks

Describe the bug

When the list of file becomes long enough, the output of ls command will sometimes be hidden and only shows a blank on top, which makes me feel there is something wrong with the command itself, but somehow when you scroll up, you will see the full output. As attached in the screen recording. There are similar issues but not exactly the same, they are all about the output of a command in terminal. https://github.com/warpdotdev/warp/issues/5568 command output hidden when starting the session https://github.com/warpdotdev/warp/issues/3207 this issue might be closer to this one but seems it's related to a specific command? https://github.com/warpdotdev/warp/issues/2995 this issue is about output totally missing, not hidden

To reproduce

Go to any folder, touch files one by one, and then use the ls command check the output.

Expected behavior

Don't hide the output, but instead show full or truncated output

Screenshots, videos, and logs

https://github.com/user-attachments/assets/3c5c881e-3e84-4591-85e1-649dcb815b65

Operating system (OS)

macOS

Operating system and version

Sonoma 14.7

Shell Version

bash 5.2.37

Current Warp version

v0.2025.05.28.08.11.stable_03

Regression

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

Recent working Warp date

I just started using warp very recently maybe like one week ago

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 @kuixiong-jai, I'm not able to reproduce this issue so suspect there could be something in your rc file causing this issue and Warp cannot parse it. We have a list of known incompatible tools here: https://docs.warp.dev/help/known-issues#list-of-incompatible-tools. You can disable them just for Warp by using this conditional statement:

# Bash and Zsh
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
# > What you want to disable here <
fi

You can also try with an empty rc file and see if the issue persists. Let us know if that helps.

kuixiong-jai commented 3 weeks ago

@dannyneira Thank you for your hint, I spotted the culprit line in my .bashrc file

# <<<<<<<< pyenv <<<<<<<<<<
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"         # <------ This line causes the problem
# >>>>>>>> pyenv >>>>>>>>>>

After chatting with LLM, I got 2 solutions, both work for me, and I list them here as future reference

1. as you suggested

if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
    eval "$(pyenv virtualenv-init -)"
fi

2. another fix if I still want the feature, but with some inefficiency
eval "$(pyenv virtualenv-init - --no-rehash)"