warp icon indicating copy to clipboard operation
warp copied to clipboard

autocompletion does not work correctly when using subshell features.

Open allencho1222 opened this issue 3 years ago • 10 comments

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 avatar Jun 02 '23 07:06 allencho1222

I found that the same issue happens for docker exec.

allencho1222 avatar Jun 02 '23 07:06 allencho1222

Hey @allencho1222, thanks for filing.

A couple follow up questions:

  • What's the full docker exec command you ran when encountering this issue?
  • Is it reliably reproducible with both the ssh'd subshell and the docker subshell?
  • For the ssh subshell - what version of zsh is installed on the remote host?

zachbai avatar Jun 02 '23 15:06 zachbai

Hi @zachbai

1.docker exec -w /path/to/the/dir -it dev zsh -l 2. sure 3. 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

allencho1222 avatar Jun 05 '23 05:06 allencho1222

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

pim-pesochek avatar Jun 16 '23 22:06 pim-pesochek

same as @pim-pesochek

tim-sheung avatar Jun 25 '23 13:06 tim-sheung

@zachbai Could you find and reproduce the issue?

allencho1222 avatar Jul 01 '23 01:07 allencho1222

@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 avatar Jul 06 '23 17:07 zachbai

@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.

zachbai avatar Jul 06 '23 17:07 zachbai

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)

DucretJe avatar Jul 08 '23 09:07 DucretJe

@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).

allencho1222 avatar Jul 17 '23 12:07 allencho1222