withfig / fig

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

Autocomplete not displaying files #1958

Open MatthewCushing opened 1 year ago

MatthewCushing commented 1 year ago

Checks

Operating system

MacOS

Expected behaviour

I expected to receive a list of files by default as the autocomplete's last fallback option for matching. For commands like cat or mv or cp I expected to see a list of files and folders in my current directory.

Actual behaviour

No matter the command, I never receive a list of files in the current directory. Autocomplete only provides folders that are in my current directory, CLI commands, and CLI arguments. Is this expected behavior? I've looked through past issues and seen images where the tool did provide files, but I'm unsure if that was past behavior that got removed or not.

I had hoped it would provide files as I now have to use ZSH for file completion and Fig for everything else. So, I can start using Fig for my command and directory auto completion, but then I have to hit Esc key to force Fig to close and then use my tab key to get ZSH autocompletion in the current directory.

Steps to reproduce

  1. Open Kitty terminal
  2. Type ./
  3. No file suggestions in autocomplete, only folders

OR

  1. Open Kitty terminal
  2. Type cat
  3. Fig suggests folders in CWD but does not suggest any files in the CWD

Environment

fig-details:
  - desktop-version: Version 1.0.62 (B542) [U.S.]
hardware-info:
  - model: MacBook Pro
  - model-id: MacBookPro18,4
  - chip-id: Apple M1 Max
  - cores: 10 (8 performance and 2 efficiency)
  - mem: 64 GB
os-info:
  - macOS 13.0.0 (22A379)
environment:
  - shell: /bin/zsh
  - terminal: <unknown>
  - cwd: /Users/cush/Developer/Caring-for-the-Heart/bcpe
  - exe-path: /usr/local/bin/fig
  - install-method: brew
  - env-vars:
    - FIG_INTEGRATION_VERSION: 8
    - FIG_TERM: 1
    - FIG_TERM_VERSION: 2.5.3
    - PATH: /Users/cush/.local/share/fig/plugins/git-open:/Users/cush/.pyenv/shims:/Library/PostgreSQL/12/bin/:/Users/cush/Library/Android/sdk/platform-tools:/usr/local/Cellar/node/13.5.0/bin/:/Users/cush/.dotnet/tools:/usr/local/bin/idea:/usr/local/bin:/usr/local/opt/openjdk/bin:/Library/Frameworks/Mono.framework/Versions/Current/bin:/Users/cush/Library/Caches/fnm_multishells/66157_1664487654149/bin:/usr/local/lib/ruby/gems/3.1.0/bin:/Users/cush/Developer/Scripts/bin:/Users/cush/.local/bin:/Users/cush/bin:/Users/cush/Library/Caches/fnm_multishells/47729_1667109009334/bin:/opt/local/bin:/opt/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/kitty.app/Contents/MacOS:/Users/cush/.fig/bin:/Users/cush/.local/share/fig/plugins/git-open:/opt/local/sbin:/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/local/lib/ruby/gems/3.1.0/bin:/Library/PostgreSQL/12/bin/:/usr/local/opt/openjdk/bin:/Users/cush/Library/Android/sdk/platform-tools:/opt/local/bin:/Users/cush/Developer/Scripts/bin:/Users/cush/.dotnet/tools:/usr/local/bin/idea:/Users/cush/.local/bin:/usr/local/Cellar/node/13.5.0/bin/:/Users/cush/Library/Caches/fnm_multishells/66157_1664487654149/bin:/Users/cush/.pyenv/shims
    - SHELL: /bin/zsh
    - TERM: xterm-kitty
    - TERM_SESSION_ID: 10e52fcd-0cc1-4483-a7b9-94dac0ea9802
    - FIG_PID: 47710
    - FIG_PARENT: 10e52fcd-0cc1-4483-a7b9-94dac0ea9802
    - FIG_SET_PARENT: 10e52fcd-0cc1-4483-a7b9-94dac0ea9802
- integrations:
  - SSH: false
  - TMUX: false
  - iTerm: installed!
  - Hyper: application is not present.
  - Visual Studio Code: installed!
  - Docker: false
grant0417 commented 1 year ago

@fedeci is this still happening?

fedeci commented 1 year ago

It should be part of the fix released yesterday. Cache issues are always present. We should purge the entire package.

teziovsky commented 1 year ago

I have the same problem 🥲 I wanted to create an issue, but I see that similar already exists 😎 With folders, there isn't any problem, but not with files, unfortunately. I noticed that sometimes some files appear in autocomplete, but not all.

fedeci commented 1 year ago

This is a know issue due to bad caching of specs. We are working to solve it since apparently cache purging didn't work!

rvangraan commented 1 year ago

I'm getting the same issue. Autocomplete works for everything except files.

image
$  fig diagnostic

fig-details:
  - 2.15.0
hardware-info:
  - model:
  - model-id:
  - chip-id: Apple M2 Pro
  - cores: 10
  - mem: 16.00 GB
os-info:
  - macOS 13.3.1 (22E261)
environment:
  - shell: /nix/store/q9k2wcgbs43yddmf5vh6pkrkzq5ckklh-zsh-5.9/bin/zsh
  - terminal: iterm
  - cwd: /Users/rvg.work
  - exe-path: /opt/homebrew/bin/fig
  - install-method: brew
  - env-vars:
    - FIGTERM_SESSION_ID: b380c2ec-6269-4b88-a91c-ad373c96eca0
    - FIG_SET_PARENT_CHECK: 1
    - FIG_TERM: 2.15.0
    - PATH: /Users/rvg.work/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/rvg.work/.fig/bin:/Users/rvg.work/.local/bin:/Users/rvg.work/.zsh/plugins/forgit
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - __CFBundleIdentifier: com.googlecode.iterm2
    - FIG_PID: 52381
    - FIG_SET_PARENT: b380c2ec-6269-4b88-a91c-ad373c96eca0
rvangraan commented 1 year ago

@fedeci Can you suggest something for me to try to "clear the cache"? My fig is unusable without file completion. I've gone through the log messages and debug output and I don't see any helpful clue at all.

fedeci commented 1 year ago

@fedeci Can you suggest something for me to try to "clear the cache"? My fig is unusable without file completion. I've gone through the log messages and debug output and I don't see any helpful clue at all.

Try to run fig restart on your terminal, it may do the trick

rvangraan commented 1 year ago

fig restart may do the trick

I've tried that several times, makes no difference. I've also checked permissions (Full Disk access is on for fig) and fig doctor is very happy:

$ fig doctor

✔ Everything looks good!

  Fig still not working? Run fig issue to let us know!
  Or, email us at hello@fig.io!

What is really strange is that it finds the occasional file in some directories, but not all files in that directory. And in other directories it finds nothing at all. This works:

image

But this one breaks at .envrc:

image

I thought it might be bug due to file parsing, but this happens on empty (new) directories too:

image