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

autocompletion does not work correctly when using subshell features. #3168

Open allencho1222 opened 1 year ago

allencho1222 commented 1 year ago

Discord username (optional)

No response

Describe the bug

I can use the subshell feature when accessing the remote server using ssh with commands used in the remote server (e.g., ssh -t dev-linux "cd /root/work_dir; zsh -l") .

However, autocompletion menu provided by warp does not show up for the parent directory.

Autocompletion menu for the parent directory correctly shows up If I just use ssh (subshell feature is not used).

To reproduce

ssh -t SERVER "cd /path/to/the/target_directory/; zsh -l".

cd ../ does not show up autocompletion menu.

Expected behavior

Warp must show up autocompletion menu for the parent directory.

Screenshots

image

Operating system

MacOS

Operating system and version

local: 13.2.1, remote:Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-71-generic x86_64)

Shell Version

local: zsh 5.8.1 (x86_64-apple-darwin22.0), remote: zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

Current Warp version

v0.2023.05.30.08.03.stable_02

Regression

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

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

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

N/A, the issue only applies to a Warp specific feature. (i.e. Warp AI, Workflows)

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

allencho1222 commented 1 year ago

I found that the same issue happens for docker exec.

zachbai commented 1 year ago

Hey @allencho1222, thanks for filing.

A couple follow up questions:

allencho1222 commented 1 year ago

Hi @zachbai

1.docker exec -w /path/to/the/dir -it dev zsh -l

  1. sure
  2. It is zsh 5.8.1 (x86_64-ubuntu-linux-gnu).

I also found that the autocompletion menu shows wrong entries.

The command is ssh -t server "cd ~/Dropbox; zsh -l".

For instance, cd ../ lists the possible entries in the current directory, not the parent directory (see below).

image
pim-pesochek commented 1 year ago

I'm having problems with autocompletion even without using subshell. I didn't spot the time when autocompletion stopped working for me, but I was trying to fix it with Warp AI help, but it didn't fix the problem. Warp autocompletion only shows directories and files when I press tab after command. I use zsh 5.9 (x86_64-apple-darwin22.0) macOs Ventura 13.3.1

tim-sheung commented 1 year ago

same as @pim-pesochek

allencho1222 commented 1 year ago

@zachbai Could you find and reproduce the issue?

zachbai commented 1 year ago

@allencho1222 It looks like there's an issue with our filesystem completions -- are you getting working non-file/directory suggestions? e.g. if you run some command with completions support (like git for example) - do you get a valid set of suggestions?

zachbai commented 1 year ago

@pim-pesochek @tim-sheung would you mind filing a separate issue? Subshells and top-level shells actually use different completions implementations so its fairly likely that you're encountering a separate bug.

DucretJe commented 1 year ago

I have the same issue, also tested with docker. When I attach without subshell I have auto completion, if I subshell it, it breaks.

Warp v0.2023.07.04.08.03.stable_02 zsh 5.9 (x86_64-debian-linux-gnu)

allencho1222 commented 1 year ago

@zachbai The git command correctly suggests related things such as diff and add while I am in an environment where the suggestions do not work correctly for the filenames or directory names (e.g., ../ still suggests one in the current directory, not the parent directory).