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.23k stars 367 forks source link

Navigation without `cd` has broken suggestions. #4585

Open wilsonhou opened 7 months ago

wilsonhou commented 7 months ago

Discord username (optional)

itswilsonhou

Describe the bug

Navigating between folders without cd has broken autocomplete / suggestions.

E.g:

~/Documents/lowercase -> this will show either 'No suggestions' or incorrect suggestions

cd ~/Documents/lowercase -> this will show correct suggestions

To reproduce

  1. Open warp's global terminal (with the global hotkey).

  2. Try to navigate to any folder with ~/anything -> autocomplete / suggestions should be broken.

Expected behavior

I expect suggestions to come up instead of just saying 'No suggestions' or worse, incorrect suggestions.

Screenshots

image

Screenshot of 'No suggestions' when there should be suggestions.

Screenshot 2024-03-19 at 2 38 03 pm

Screenshot of nonsensical / wrong suggestions.

image

i don't even know what to say to this one^ 😅

Screenshot 2024-03-19 at 5 53 52 pm

Screenshot of correct suggestions when using cd explicitly

Operating system

MacOS

Operating system and version

Sonoma 14.0 (23A344)

Shell Version

zsh 5.9 (x86_64-apple-darwin23.0)

Current Warp version

v0.2024.03.12.08.02.stable_01

Regression

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

Recent working Warp date

18/3/2024 ? (issue first experienced today: 19/3/2024), AEST timezone.

Additional context

Using oh-my-zsh if that helps. Very vanilla .zshrc file consisting of something like this:

if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
PATH="/usr/local/bin:$PATH:/opt/homebrew/bin"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

alias v=nvim

[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# bun completions
[ -s "/Users/wilsonhou/.bun/_bun" ] && source "/Users/wilsonhou/.bun/_bun"

export BUN_INSTALL="/Users/wilsonhou/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"

export PATH="/usr/local/opt/python@3.11/bin:$PATH"

alias pn=pnpm
alias pni="pnpm install"
alias pna="pnpm add"
alias pnd="pnpm run dev"
alias pnx="pnpm dlx"
alias code="cursor"
alias gcm="git commit -m"

alias ci="code-insiders"
alias vim="nvim"

# pnpm
export PNPM_HOME="/Users/wilsonhou/Library/pnpm"
case ":$PATH:" in
  *":$PNPM_HOME:"*) ;;
  *) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end

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 7 months ago

Hi @wilsonhou sorry about this, please work around by putting the following alias in your rc file.

alias ~='cd ~'

wilsonhou commented 7 months ago

thanks for the quick response danny! unfortunately not working as a workaround :(

image

^applied alias

image

same issue happening after alias applied and terminal restarted^

seems like it's getting confused about my current working directory location: (e.g it's suggesting folders that don't exist in the current directory:

image
wilsonhou commented 7 months ago

weirdly enough, relative paths seem to get correct autocomplete, and even absolute paths? (starting with /) - aliasing doesn't seem to help with autocomplete at all though unfortunately (e.g aliasing ~ with /Users/wilsonhou/ doesn't fix the autocomplete being broken issue.)

Screenshot 2024-03-19 at 6 11 29 pm

Just tested on v0.2024.03.05.08.02.stable_01: issue exists in that release too.

dannyneira commented 7 months ago

This is an issue we're looking into. It looks like even with the workaround, we're getting permission denied errors.