Closed deekshithanand closed 1 year ago
I have this exact same issue. I noticed that if I do a source ~/.zshrc
then mcfly breaks on the source. If I run just a zsh
, then mcfly seems to load properly.
.zshrc:
# Custom folder
ZSH_CUSTOM=~/.omz-custom
export ZSH="/Users/alexhatzenbuhler/.oh-my-zsh"
source $ZSH/oh-my-zsh.sh
eval "$(mcfly init zsh)"
When loading my terminal for the first time, mcfly works as expected. Once I source ~/.zshrc
mcfly breaks. Here's another video of it happening:
It's odd that sourcing it again causes a problem. I think the lines at the top of mcfly.zsh may be the issue.
if [[ -o interactive ]] && [[ "$__MCFLY_LOADED" != "loaded" ]]; then
__MCFLY_LOADED="loaded"
I wonder if they need to be
if [[ -o interactive ]] && [[ "$__MCFLY_LOADED" != "loaded" ]]; then
export __MCFLY_LOADED="loaded"
Actually, it seems the solution is in the other direction, removing the entire $__MCFLY_LOADED
concept fixes it for me:
# Ensure stdin is a tty
if [[ -o interactive ]]; then
Hi there,
Issue : Mcfly works when the new terminal is opened first time. But if for some reason, if you source your rc file (zshrc in my case) , it makes mcfly stop working. I have provided a detailed evidence below. I can confirm that this issue is reproducible on macOS iterm2 as well.
Snippet used in my zshrc file:
Bug can be replicated as shown below :![mcfly_bug](https://user-images.githubusercontent.com/24704695/223777198-0dfa2a26-e38e-4f95-941f-9d61cc0bc1d5.gif)