fig
fig copied to clipboard
setting path in fig doesn't recognize $HOME
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 - [ ] I have typed 'git ' and included a screenshot of the Debugger (click the Fig icon in the macOS menu bar)
Issue Details
Description:
Please include a detailed description of the issue (and an image or screen recording, if applicable)
When you add items to the path in fig using $HOME, apps cannot be found. Change it to ~ and it works. Its like fig doesn't replace $HOME correctly.
so this doesn't work
but this does:
Environment
## Fig details:
- Fig version: Version 1.0.58 (B462) [Beta] [Workman-Dead]
- Bundle path: /Applications/Fig.app
- Autocomplete: true
- Settings.json: true
- Accessibility: true
- Number of specs: 0
- Symlinked dotfiles: true
- Only insert on tab: false
- Keybindings path:
- Installation Script: true
- PseudoTerminal Path: /Users/matt/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/Users/matt/.local/bin:/Users/matt/.fig/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Applications/Wireshark.app/Contents/MacOS:/opt/homebrew/bin:/Users/matt/.krew/bin:/Users/matt/bin
- SecureKeyboardInput: false
- SecureKeyboardProcess: <none>
## Hardware Info:
- Model Name: MacBook Pro
- Model Identifier: MacBookPro18,2
- Chip: Apple M1 Max
- Cores: 10 (8 performance and 2 efficiency)
- Memory: 64 GB
## OS Info:
- macOS 12.4.0 (21F79)
## Environment:
- User Shell: /opt/homebrew/bin/fish
- Current Directory: /Users/matt/.config/fish
- CLI Installed: true
- Executable Location: /opt/homebrew/bin/fig
- Current Window ID: 6460/% (com.googlecode.iterm2)
- Active Process: fish (3326) - /dev/ttys002
- Installed via Brew: true
- Environment Variables:
- FIG_TERM=1
- TERM_SESSION_ID=w0t0p0:261FF261-F226-435B-9D8D-0710E3E786CE
- FIG_TERM_VERSION=4.4.0
- TERM=xterm-256color
- FIG_INTEGRATION_VERSION=8
- FIG_PID=3326
- PATH=/Users/matt/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:$HOME/bin:$HOME/.krew/bin:/opt/homebrew/bin:/Users/matt/.local/bin:/Users/matt/.fig/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Applications/Wireshark.app/Contents/MacOS
## Integrations:
- SSH: false
- TMUX: false
- iTerm: installed!
- Hyper: application is not present.
- Visual Studio Code: installed!
- Docker: true
It's not $HOME
that doesn't work in PATH, the actual problem is that we can't use the environment variable in PATH.
For now, the only workaround that I found is to use script block instead.
After some digging, it was because fig will add the quote to the PATH, like PATH=$PATH:'$HOME/bin'
, which will cause the ENV to be ignored.
Do you have any plans to implement this? I can't see the quotes around the PATH
, but it seems like fig simply adds anything in the field as a string without executing it. I've tried calling it with eval
or I $()
, but still... It's treated as a string. Not a dealbreaker, but it'd be nice to have more flexibility. Right now, even ~
doesn't work. It has to be an absolute path 😢
Fixed now! This was one of my biggest annoyances too. Should just work "as expected", including leading ~, but if there are any issues please let me know and I'll fix
This took so long to implement because there is a shocking number of edge cases to handle.