withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.05k stars 63 forks source link

autocomplete common prefix doesn't add the correct characters #1272

Closed Wassap124 closed 2 years ago

Wassap124 commented 2 years ago

Description:

it seems like when I try to get the common prefix - the entire completion is added on top
of what I already typed, instead of appending:

  1. typing git st
  2. pressing tab
  3. expecting to have git sta on my terminal
  4. getting git ststa

pics:

Screen Shot 2022-04-07 at 9 07 30

pressing tab

Screen Shot 2022-04-07 at 9 07 36

It seems that an insertion of a specific option is working properly:

Details:

OS Fig Shell
macOS 12.1.0 (21C52) 1.0.56 /bin/zsh
fig diagnostic

# Fig Diagnostics ## Fig details: - Fig version: Version 1.0.56 (B421) [ABC] - 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: /Users/alonkazimirsky/.nvm/versions/node/v16.14.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/alonkazimirsky/.local/bin:/Users/alonkazimirsky/.fig/bin:/Users/alonkazimirsky/.local/bin:/Users/alonkazimirsky/.local/bin:/Users/alonkazimirsky/Library/Python/2.7/bin - SecureKeyboardInput: false - SecureKeyboardProcess: ## Hardware Info: - Model Name: MacBook Pro - Model Identifier: MacBookPro18,3 - Chip: Apple M1 Pro - Cores: 8 (6 performance and 2 efficiency) - Memory: 16 GB ## OS Info: - macOS 12.1.0 (21C52) ## Environment: - User Shell: /bin/zsh - Current Directory: /Users/alonkazimirsky/git-repos/web-registration - CLI Installed: true - Executable Location: /Users/alonkazimirsky/.local/bin/fig - Current Window ID: 309/% (com.googlecode.iterm2) - Active Process: zsh (3990) - /dev/ttys004 - Environment Variables: - TERM_SESSION_ID=w0t1p0:602F533F-F28B-41E0-96DF-F092BAFD7D33 - PATH=/Users/alonkazimirsky/.nvm/versions/node/v16.14.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/alonkazimirsky/.local/bin:/Users/alonkazimirsky/.fig/bin:/Users/alonkazimirsky/.local/bin:/Users/alonkazimirsky/.local/bin:/Users/alonkazimirsky/Library/Python/2.7/bin - TERM=xterm-256color - FIG_INTEGRATION_VERSION=8 - FIG_TERM=1 - FIG_TERM_VERSION=4.3.0 ## Integrations: - SSH: false - TMUX: false - iTerm: installed! - Hyper: application is not present. - Visual Studio Code: installed! - Docker: false

nickygerritsen commented 2 years ago

Having the same issue since a few days. Also ZSH. Same happens with ssh [somechars][tab].

mschrage commented 2 years ago

Thanks for reporting this! @fedeci can you investigate?

Likely a bug with the insert common prefix keybindings logic.

@nickygerritsen @Wassap124 can you share the output of cat ~/.fig/settings.json ?

Wassap124 commented 2 years ago
{
  "autocomplete.fuzzySearch": true,
  "autocomplete.keybindings.enter": "insertSelected",
  "autocomplete.scrollWrapAround": true
}
nickygerritsen commented 2 years ago
{
  "autocomplete.disable" : false,
  "autocomplete.theme" : "system"
}
fedeci commented 2 years ago

My fault! Fixed by Sean🚀