Insert selected does not work with enter or tab key
Description:
In my environment, the selected auto-complete suggestion does not end up in the terminal. I have attached a short screen capture to showcase the behavior.
When multiple suggestions pop-up and I hit tab, then the box simply bounces. When I hit enter, the box closes without propagating the selected command to the terminal.
When only one suggestions is visible, hitting tab closes the box but also does not auto-complete the actual selection to the terminal. Same behavior applies to hitting enter key.
Am I doing anything wrong? I set Fig up from scratch just now.
https://user-images.githubusercontent.com/315219/148420770-8e6651a0-f4cb-4ef9-a885-9682dd352017.mov
Details:
| macOS | Fig | Shell |
|---|---|---|
| 12.1.21C52 | 1.0.53 | /bin/zsh |
fig diagnostic
Fig Version: Version 1.0.53 (B340) [Beta] [ABC – Extended] UserShell: /bin/zsh Bundle path: /Applications/Fig.app Autocomplete: true Settings.json: true CLI installed: true CLI tool path: /usr/local/bin/fig Accessibility: true Number of specs: 0 SSH Integration: false Tmux Integration: false Keybindings path: iTerm Integration: installed! Hyper Integration: application is not present. VSCode Integration: installed! Docker Integration: false Symlinked dotfiles: true Only insert on tab: false Installation Script: true PseudoTerminal Path: /Users/dominik/.nvm/versions/node/v17.2.0/bin:/usr/local/share/npm/bin:/Users/dominik/.config/yarn/global/node_modules/.bin:/opt/X11/bin:/Users/dominik/Library/Android/sdk/tools:/Users/dominik/Library/Android/sdk/platform-tools:/bin:/Users/dominik/.rvm/bin:/Users/dominik/.bin:/usr/local/sbin:/Users/dominik/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/dominik/.cargo/bin:/Users/dominik/.fig/bin SecureKeyboardInput: false SecureKeyboardProcess:Current active process: zsh (54396) - /dev/ttys002 Current working directory: /Users/dominik/Clones/dotfiles Current window identifier: 8874/% (com.googlecode.iterm2) Path: /Users/dominik/.nvm/versions/node/v17.2.0/bin:/usr/local/share/npm/bin:/Users/dominik/.config/yarn/global/node_modules/.bin:/opt/X11/bin:/Users/dominik/Library/Android/sdk/tools:/Users/dominik/Library/Android/sdk/platform-tools:/bin:/Users/dominik/.rvm/bin:/Users/dominik/.bin:/usr/local/sbin:/Users/dominik/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/dominik/.cargo/bin:/Users/dominik/.fig/bin Fig environment variables: - TERM_SESSION_ID=w0t0p0:6D1762BD-D0B3-4888-8208-C2C9019ADBF2 - FIG_INTEGRATION_VERSION=5 - FIG_TERM=1 - FIG_TERM_VERSION=3 - FIG_ENV_VAR=1 - FIG_CHECKED_PROMPTS=1
Hey @dbrack! Would you mind running fig debug logs in a separate terminal session and take another screen recording?
@mschrage sure thing, will do as soon as I have access to my laptop again
Thanks so much! It seems like you're running into an issue with the unix socket connection between the macOS app and figterm - the executable that handles Fig's integration with the shell. But not exactly sure what's triggering it.
@mschrage here you are 😄 recording plus the log file. interestingly, it sometimes works with certain commands, such as cat file. But not every time.
Let me know if you need anything else.
https://user-images.githubusercontent.com/315219/148506968-73900fc0-03b4-4b4c-94ef-4798237ccc3a.mov
@dbrack! Thanks so much for this. It seems that the insertion fails with Error connecting to socket, 61. (61 is the errno for "Connection Refused")
First, can you run ps in your terminal and share the results here.
Then can you run FIG_LOG_LEVEL=DEBUG in the non-logging terminal session and the restart the logging process and the record another video.
For some reason, figterm is refusing the connection and potential this additional logging will shed some light on why.
@mschrage interesting! getting there 😄 thank you so much for looking at this!
here's the output you asked for
https://user-images.githubusercontent.com/315219/148514384-76d42f0f-2cb2-40ae-a104-9e00a0e4c206.mov
@mschrage is there anything else I could possibly do to further support your findings and make it easier for you? 😃
Hey @dbrack would you be free to jump on a 1:1 support call? https://calendly.com/mschrage/30min
In the meantime, can you run ls /tmp | grep $TERM_SESSION_ID in a terminal session where this bug is happening?
Thanks to @dbrack we've figure out what was going on here (#677) and should have a fix in the next build.
In the meantime, there is temporary workaround: Go to System Preferences > General and make sure the "Close windows when quitting an app" checkbox is checked.
@mschrage hey Matt! I just re-tested and can confirm v1.0.54 fixes the described issue without changing Close windows when quitting an app.
Great job!
Amazing! Will close this issue now.