withfig / fig

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

Support for Zellij multiplexer #1662

Closed Integralist closed 2 years ago

Integralist commented 2 years ago

Sanity checks

Issue Details

Description:

I'm using https://zellij.dev (a multiplexer, like tmux) with the Alacritty terminal, and I've found that fig autocomplete just doesn't work from within zellij.

If I type fig<space> in Alacritty, then I'll see the autocomplete menu appear. If I execute the zellij command to drop inside the zellij multiplexer and I type fig<space> (or any other command I'd expect fig to work with) it does nothing.

But if I execute fig doctor from within the zellij multiplexer instance, it will tell me everything is good.

Environment

# Fig Diagnostics
## Fig details:
  - Fig version: Version 1.0.59 (B487) [Beta] [British]
  - 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/integralist/.yarn/bin:/Users/integralist/.config/yarn/global/node_modules/.bin:/Users/integralist/Library/Caches/fnm_multishells/70374_1659516715551/bin:/Users/integralist/bin:/Users/integralist/.cargo/bin:/Users/integralist/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/integralist/.yarn/bin:/Users/integralist/.config/yarn/global/node_modules/.bin:/Users/integralist/Library/Caches/fnm_multishells/69886_1659516702081/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/integralist/.fig/bin:/Users/integralist/.local/bin:/opt/homebrew/opt/fzf/bin
  - SecureKeyboardInput: false
  - SecureKeyboardProcess: <none>
## 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.4.0 (21F79)
## Environment:
  - User Shell: /opt/homebrew/bin/bash
  - Current Directory: /Users/integralist/Code/shell/dotfiles
  - CLI Installed: true
  - Executable Location: /Users/integralist/.fig/bin/fig
  - Current Window ID: 8254/% (io.alacritty)
  - Active Process: zsh (69814) - /dev/ttys025
  - Terminal: <unknown>
  - Environment Variables:
    - PATH=/Users/integralist/.yarn/bin:/Users/integralist/.config/yarn/global/node_modules/.bin:/Users/integralist/Library/Caches/fnm_multishells/72673_1659517193597/bin:/Users/integralist/bin:/Users/integralist/.cargo/bin:/Users/integralist/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/integralist/.yarn/bin:/Users/integralist/.config/yarn/global/node_modules/.bin:/Users/integralist/Library/Caches/fnm_multishells/69886_1659516702081/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/integralist/.fig/bin:/Users/integralist/.local/bin:/opt/homebrew/opt/fzf/bin
    - TERM=xterm-256color
    - TERM_SESSION_ID=DEDEB765-3B99-4524-B16A-072949A54663
    - FIG_INTEGRATION_VERSION=8
    - FIG_TERM=1
    - FIG_TERM_VERSION=4.4.2
    - FIG_PID=72575
## Integrations:
  - SSH: false
  - TMUX: false
  - iTerm: application is not present.
  - Hyper: application is not present.
  - Visual Studio Code: application is not present.
  - Docker: true
Integralist commented 2 years ago

FYI your diagnostic output suggests my shell is Bash when it's Zsh.

$ echo $SHELL
/opt/homebrew/bin/zsh
clo4 commented 2 years ago

Definitely agree! Early support for zellij would be great 🙂


As an aside...

The "User Shell" line is from the directory service, specifically dscl . -read /Users/$(id -un) UserShell, which returns the current login-shell. Changing that requires editing /etc/shells and running chsh -s $(which zsh).

AFAIK the $SHELL variable is actually set by the terminal on launch, which is why it reports zsh. Can set the terminal to launch any program and it'll happily oblige:

Screen Shot 2022-08-03 at 7 36 37 pm

The most reliable way to get the actual running shell instance is a hidden command in Fig! fig _ get-shell always returns the real path of the current shell.

Screen Shot 2022-08-03 at 7 42 38 pm
clo4 commented 2 years ago

Was just putting this into our weekly support meeting notes and saw that (surprisingly) there's already an issue for zellij! Will close in favor of that just to keep the number down 😄

(still getting mentioned in the meeting of course!)

Duplicate of #1004