Every launch of Fig in Fish attempts to cd ~/.fig/bin
Sanity checks
- [X] I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
- [X] I have run
fig doctorin the affected terminal session - [X] I have run
fig restartand tested again (tell us if that fixed it)
Issue Details
From a fresh Fig install using Fish shell every window/tab launch tries to: cd ~/.fig/bin (y/N)
and has to be dismissed twice.
relates to the pre script that is installed by fig in ~/.config/fish/conf.d/00_fig_pre.fish
eval (~/.local/bin/fig init fish pre --rcfile 00_fig_pre | string split0)
Can't comment this out as it then doesn't run Fig in Fish.
Doctor and Restart don't resolve.
Environment
# Fig Diagnostics
## Fig details:
- Fig version: Version 1.0.59 (B489) [U.S.]
- 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: /usr/local/sbin:/usr/local/opt/libxml2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Users/jason/.fig/bin:/Users/jason/.local/bin:/Users/jason/.fig/bin:/Users/jason/.local/bin:/Users/jason/.fig/bin:/Users/jason/.local/bin:/Users/jason/.composer/vendor/bin/:/Users/jason/.fig/bin:/Users/jason/.local/bin:/Users/jason/.fig/bin:/Users/jason/.local/bin:/Users/jason/.composer/vendor/bin/
- SecureKeyboardInput: false
- SecureKeyboardProcess: <none>
## Hardware Info:
- Model Name: MacBook Pro
- Model Identifier: MacBookPro18,4
- Chip:
- Cores: 10
- Memory: 32 GB
## OS Info:
- macOS 12.4.0 (21F79)
## Environment:
- User Shell: /usr/local/bin/fish
- Current Directory: /Users/jason/.config/fish/conf.d
- CLI Installed: true
- Executable Location: /usr/local/bin/fig
- Current Window ID: 49795/% (com.googlecode.iterm2)
- Active Process: fish (37101) - /dev/ttys004
- Terminal: iterm
- Installed via Brew: true
- Environment Variables:
- TERM=xterm-color
- FIG_PID=36831
- PATH=/usr/local/sbin:/usr/local/opt/libxml2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Users/jason/.fig/bin:/Users/jason/.local/bin:/Users/jason/.composer/vendor/bin/
- TERM_SESSION_ID=w1t0p0:2EFE2300-728C-46F4-AC72-BEBAA16BED21
## Integrations:
- SSH: false
- TMUX: false
- iTerm: installed!
- Hyper: installed!
- Visual Studio Code: installed!
- Docker: false
Hey @jasonshanks! Thanks for the report. Super weird because I'm also using fish as my shell, not getting this error. Can you run alias in your shell and send the output? I think the issue might be related to an overridden command. And do you have any lazy-loaded commands? (eg. commands in ~/.config/fish/functions)
Hey Robert –
Thanks for the prompt investigation!
Here are my aliases (one of my custom ones throwing it off?) alias ... 'cd ../..' alias .... 'cd ../../..' alias fish_key_reader /usr/local/Cellar/fish/3.3.1/bin/fish_key_reader
And I think my fish functions are pretty stock: 64enc.fish 64font.fish 64svg.fish __abbr_tips_bind_newline.fish __abbr_tips_bind_space.fish __abbr_tips_init.fish __auto_dir.fish __best_pager.fish, __complete_extension.fish __exec_available.fish __human_time.fish __is_text.fish __ls_text_files.fish __prev_token.fish __re_extension.fish __regex_from_args.fish, ack.fish acorn.fish add_user_path.fish affd.fish afff.fish ag.fish agnoster.fish alpha.fish ax.fish bak.fish be.fish bid.fish bld.fish browser.fish c.fish, calc.fish cat.fish cbp.fish cdd.fish cdr.fish cdt.fish chrome.fish cl.fish clip.fish code.fish cpwd.fish cr.fish crush.fish dadjoke.fish dash.fish, ddg.fish degit.fish describe.fish dirfor.fish dman.fish docx2mmd.fish eds.fish er.fish esc.fish eschtml.fish extract.fish f.fish fallback.fish, fish_mode_prompt.fish fish_prompt.fish fisher.fish fix.fish flush.fish fp.fish ft.fish fuck.fish gc.fish get_ext.fish getignore.fish getignores.fish gg.fish, gist.fish gistp.fish gitar.fish gmine.fish gsearch.fish gt.fish gtheirs.fish hs.fish idea.fish imdown.fish imgsize.fish ip.fish ips.fish istext.fish, js.fish lb.fish lbash.fish lno.fish lsgrep.fish lsz.fish lt.fish ltr.fish mack.fish md.fish mkdir.fish mmdc.fish nope.fish o.fish optim.fish pbgist.fish, pbgistp.fish percentof.fish percentoff.fish pless.fish pman.fish prev.fish preview.fish prioritize.fish r.fish rule.fish rulem.fish rvm.fish serve.fish, shellesc.fish shellunesc.fish shorten.fish spell.fish spellf.fish src.fish sublp.fish sum.fish td.fish tmj.fish tower.fish tp.fish unbak.fish unesc.fish, up.fish urlenc.fish watchthis.fish xc.fish yep.fish yn.fish zipup.fish On 3 Aug 2022, 4:49 PM +1000, 'Robert' via web 1 @.***>, wrote:
Hey @jasonshanks! Thanks for the report. Super weird because I'm also using fish, not getting this error. Can you run alias in your shell and send the output? I think the issue might be related to an overridden command. And do you have any lazy-loaded commands? (eg. commands in ~/.config/fish/functions) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Thanks for the list! In your mkdir function does it automatically cd into the directory it creates? To fix this we'll use command mkdir instead but I have a feeling this is the issue
Yes it does!
function mkdir -d "mkdir with subdirs, option to cd after creating" command mkdir -p $argv if test $status = 0 set -l target $argv[-1] switch $target case '-*'
case '' if test -d $target set -l res (read -n 1 -P (set_color green)"cd $target? (y/"(set_color -o brgreen)"N"(set_color normal)(set_color green)"): "(set_color normal)) if test "$res" = "y" cd $target return end end end end end On 4 Aug 2022, 11:52 AM +1000, 'Robert' via web 1 @.**>, wrote:
Thanks for the list! In your mkdir function does it automatically cd into the directory it creates? To fix this we'll use command mkdir instead but I have a feeling this is the issue — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Ahhh that looks like the reason then! Will sneak the fix into the next beta :)
In the mean time guarding the cd block with if not status is-block; <your code here>; end should do the trick!
Cheers 🍻 Thank you so much! On 5 Aug 2022 at 9:11 AM +1000, 'Robert' via web 1 @.***>, wrote:
Ahhh that looks like the reason then! Will sneak the fix into the next beta :) In the mean time guarding the cd block with if not status is-block;
; end should do the trick! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>