Closed stepanselyuk closed 3 years ago
Ok so mcfly init zsh
just returns the same content as in these scripts...
I tried to run
eval "$(mcfly init zsh)"
in opened shell and it worked. But for some reason, it's not working when I placed that at the end of the .zshrc file.
Are you sure that last line of your .zshrc
file is getting executed? Maybe add an echo
statement or check that MCFLY_HISTORY
is set in env
?
I did a little debugging and seems my ZSH installation reacts to this instruction:
[[ -t 0 ]] || return
when I changed it to:
if [ -t 1 ]; then return 0; fi
it started working as expected...
Does if [[ ! -t 0 ]]; then return 0; fi
work?
Nope, that is not working...
Good examples of how to check if a shell is interactive or not in various shells: https://unix.stackexchange.com/questions/26676/how-to-check-if-a-shell-is-login-interactive-batch/26782
[[ ! -o interactive ]] && return 0
this works for me
Should be fixed in https://github.com/cantino/mcfly/pull/164
Should be fixed in #164
Can confirm that this fixes the issue for me!
Great, thanks for checking @thomaseizinger!
Hello,
I've downloaded the latest release archive and there are the binary file and shell files. I created
~/.bin
directory and placed the files there and added~/.bin
to the PATH.I'm on Ubuntu 20.04.2 and use Guake + Zsh + OhMyZSH (with plugins) + powerlevel10k theme. What are my next steps? I placed at the end of .zshrc:
Once I got setup-dialog from McFly and it even created
~/.mcfly/history.db
, but then it's not bonded with Ctrl+R. I tried to disabledfzf
andhistory
plugins from OhMyZSH, and after that, I've got just plain ctrl+R function.How to make it work and how to use mcfly.zsh / mcfly.bash scripts?