Open volfyd opened 3 years ago
Does if [ -t 1 ]; then return 0; fi
from https://github.com/cantino/mcfly/issues/154#issuecomment-856262557 fix it?
@cantino That line is almost the opposite logic of the original logic. The original logic returns if FD 0 is NOT a TTY. The logic in
if [ -t 1 ]; then return 0; fi
is the opposite where it returns if FD 1 IS a TTY. I think it will break folks who do not have an unusual setup where the FD are being redirected.
Thank you @volfyd. I guess we want if [[ ! -t 0 ]]; then return 0; fi
then?
[[ ! -o interactive ]] && return 0
this works for me
Can you see if https://github.com/cantino/mcfly/pull/164 fixes this?
Powerlevel10k instant prompt is a neat feature where a quite complex prompt can be initially displayed without fully loading .zshrc. During the loading of .zshrc, standard in is redirected to /dev/null.
https://github.com/romkatv/powerlevel10k/blob/master/README.md
This causes problems with mcfly.
The command
eval "$(mcfly init zsh)"
runs the following as the first command:This causes the eval to return an error I think. I saw very odd behavior where the zsh prompt would load every other xterm I opened. The other half of the time, the powerlevel10k (p10k) wizard would open.
I was able to solve this by changing the command in .zshrc to
I would say that the Powerlevel10k behavior is strange, but it is an exceptionally popular plugin so it may make sense to either document this problem or to code around it.