fig icon indicating copy to clipboard operation
fig copied to clipboard

uninstall left pre/post in .zshrc (brew)

Open mrienstra opened this issue 1 year ago • 0 comments

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
  • [X] I have run fig restart and tested again (tell us if that fixed it)

Issue Details

Description:

  1. Installed with brew install --cask fig as per README.md here and at withfig/autocomplete (though FYI https://fig.io/ shows brew install fig)
  2. Uninstalled with brew uninstall fig, everything looked smooth, but after restarting Terminal.app I saw pre/post errors, took a look at .zshrc and pre/post blocks are still there.

I did add a blank line after the pre block, to make it more obvious where the pre block ended.

Before installing fig, first line of .zshrc (verified by checking ~/.fig.dotfiles.bak/):

PROMPT='%(?.%F{green}√.%F{red}%?)%f %F{240}%2~%f %# '

After installing fig, first 3 lines of .zshrc:

# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
PROMPT='%(?.%F{green}√.%F{red}%?)%f %F{240}%2~%f %# '

After adding newline, first 4 lines of .zshrc:

# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"

PROMPT='%(?.%F{green}√.%F{red}%?)%f %F{240}%2~%f %# '

Maybe the newline tripped up the uninstall? Seems a little unlikely, but possible.

Edit: Whoops, this also occurred with ~/.zprofile.

Edit 2: Seems like the changes Fig added to my VS Code settings.json were also not removed.

Environment

MacOS 12.3
Terminal.app 2.12.5 (444)
M1
Homebrew 3.6.4

mrienstra avatar Oct 09 '22 07:10 mrienstra