fig icon indicating copy to clipboard operation
fig copied to clipboard

Installing and running `zsh-autocomplete` breaks fig's own autocomplete

Open ottodevs opened this issue 3 years ago • 3 comments

Sanity checks

  • [X] I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
  • [X] I have run fig doctor in the affected terminal session
  • [X] I have typed 'git ' and included a screenshot of the Debugger (click the Fig icon in the macOS menu bar)

Issue Details

Description:

Explanation and details

When installing zsh-autocomplete, as standalone or using fig's Plugin Store, it completely breaks fig's autocomplete.

It seems fig's autocomplete window flashes up for an instant, but zsh-autocomplete immediately hides it when loading its own results and theres is no way to bring fig's autocomplete window again, since TAB key is already hard-mapped to zsh-autocomplete.

Observations

I think this issue should be fixed by avoiding hiding autocomplete window when new text is output in the terminal (like in this case happens with zsh-autocomplete results) or, if they are actually conflicting tools, then remove zsh-autocomplete from the plugin store.

I suspect other cli-tools with similar behaviour will also break fig's autocomplete functionality, so maybe you should take a look on how it controls its own visibility, persisting just until it receives user action, and not just hiding on terminal action.

Reproduction steps

To reproduce the issue, just open Fig's plugin store, install zsh-autocomplete, run source fig in the terminal and try to use fig autocomplete, you will quickly realize it gets broken.

Environment details

I tried both beta and regular fig versions, and several different configs.

image

Fig doctor output:

➜ fig doctor


✔ Everything looks good!

Fig still not working? Run fig issue to let us know!
Or, email us at [email protected]!


~ took 3s

Environment

## Fig details:
  - Fig version: Version 1.0.58 (B468) [Beta]
  - Bundle path: /Applications/Fig.app
  - Autocomplete: true
  - Settings.json: true
  - Accessibility: true
  - Number of specs: 0
  - Symlinked dotfiles: false
  - Only insert on tab: false
  - Keybindings path: 
  - Installation Script: true
  - PseudoTerminal Path: [REDACTED]
  - SecureKeyboardInput: false
  - SecureKeyboardProcess: <none>
## Hardware Info:
  - Model Name: MacBook Pro
  - Model Identifier: MacBookPro16,1
  - Chip: 
  - Cores: 8
  - Memory: 32 GB
## OS Info:
  - macOS 12.4.0 (21F79)
## Environment:
  - User Shell: /usr/local/bin/zsh
  - Current Directory: /User/otto
  - CLI Installed: true
  - Executable Location: /usr/local/bin/fig
  - Current Window ID: 832/% (com.microsoft.VSCode)
  - Active Process: zsh (27150) - /dev/ttys006
  - Installed via Brew: true
  - Environment Variables:
    - FIG_WORKFLOWS_KEYBIND=^f
    - TERM=xterm-256color
    - PATH=[REDACTED]
    - FIG_PID=27150
    - TERM_SESSION_ID=5A07E10F-E3EF-4554-9888-7A8B398487E0
    - FIG_INTEGRATION_VERSION=8
    - FIG_TERM=1
    - FIG_TERM_VERSION=4.4.1
## Integrations:
  - SSH: false
  - TMUX: false
  - iTerm: installed!
  - Hyper: application is not present.
  - Visual Studio Code: installed!
  - Docker: false

ottodevs avatar Jul 04 '22 03:07 ottodevs

This also happens when installing zsh-autocomplete manually, pre or post fig installation

RobiFerentz avatar Aug 05 '22 18:08 RobiFerentz

I have the same issue. basically fig autocomplete doesn't pop-up at all because zsh-autocomplete overwrites it

mekhovov avatar Oct 07 '22 16:10 mekhovov

You can't use both Fig autocomplete and zsh-autocomplete at the same time, since zsh-autocomplete interfers with Fig's mechanism for determine what you've typed in the terminal.

We could remove zsh-autocomplete from the Plugin store, if that would be helpful. Or perhaps adding a warning about the conflict.

mschrage avatar Oct 08 '22 02:10 mschrage